get

Copies a file

Applicability

Product

Command type

VersionVault

cleartool subcommand

VersionVault Remote Client

rcleartool subcommand

Platform

UNIX®

Linux®

Windows®

Synopsis

get -to dest-pname pname

Description

The get command copies a file. You must issue the get command from the root directory of the view or any directory below it.

Most frequently, it is used to copy a specified version of a file element into a snapshot or web view, although get can be used in an automatic view as well.

  • To read versions of file elements that are not selected by the view's config spec, either because the element is not specified by a load rule or because you want to see a version of a loaded element other than the one currently in the view. You cannot perform VersionVault operations on these nonloaded versions copied into your view with the get command.
  • To get an updated copy of a version currently loaded in your view.

Restrictions

None.

Options and arguments

Specifying the destination file name

Default
For the parent directory: the current directory; for the file name: none.
dest-pname
Specifies a full path name (that is, including the filename) to which the version is to be copied. By requiring a destination path name, the get command is prevented from overwriting any version already loaded into your view.

Specifying the file to copy

Default
None.
pname
Specifies the version of the file element to copy into the view. Use a version-extended path name to copy a version other than the one currently loaded in the view. Specifying a path name that contains a symbolic link causes the link target to be downloaded.

Examples

The UNIX system and Linux examples in this section are written for use in csh. If you use another shell, you may need to use different quoting and escaping conventions.

The Windows examples that include wildcards or quoting are written for use in cleartool interactive mode. If you use cleartool single-command mode, you may need to change the wildcards and quoting to make your command interpreter process the command appropriately.

In cleartool single-command mode, cmd-context represents the UNIX system and Linux shells or Windows command interpreter prompt, followed by the cleartool command. In cleartool interactive mode, cmd-context represents the interactive cleartool prompt.

  • Copy the version loaded in the view into the current directory.

    cmd-context get -to foo.c.temp foo.c

  • On a UNIX® or Linux® system, copy /dev/hello_world/foo.c@@/main/2 into the current directory.

    cmd-context get -to foo.c.temp /dev/hello_world/foo.c@@/main/2

  • On a Windows® system, copy \dev\hello_world\foo.c@@\main\2 into the C:\build directory.

    cmd-context get -to C:\build\foo.c.temp \dev\hello_world\foo.c@@\main\2