get

Copies a specified version of a file element into a snapshot view

Applicability

Product

Command type

ClearCase®

cleartool subcommand

Platform

UNIX®

Linux®

Windows®

Synopsis

get –to dest-pname pname

Description

Use the get command to copy a specified version of a file element into your snapshot view. You must issue the get command from the root directory of a snapshot view or any directory below it.

You can use this command as follows:

The get command copies only file elements into a view.

Restrictions

None.

Options and arguments

Specifying the destination file name

Default
None.
dest-pname
Specifies a path name for the version. If you do not specify a directory name, the file is copied into the current directory. 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

See also

checkin, checkout, config_spec, update, version_selector


Feedback