annotate
apropos
catcr
catcs
cc.icon
cc.magic
cd
chactivity
chbl
checkin
checkout
checkvob
chevent
chflevel
chfolder
chmaster
chpool
chproject
chstream
chtype
chview
clearaudit
clearbug
cleardescribe
cleardiffbl
cleardiff
clearexport_ccase
clearexport_cvs
clearexport_pvcs
clearexport_rcs
clearexport_sccs
clearexport_ssafe
clearfsimport
cleargetlog
clearhistory
clearimport
clearjoinproj
clearlicense
clearmake
clearmake.options
clearmrgman
clearprojexp
clearprompt
cleartool
clearviewupdate
clearvobadmin
comments
config_ccase
config_spec
cptype
credmap
creds
deliver
describe
diffbl
diffcr
diff
dospace
edcs
endview
env_ccase
events_ccase
export_mvfs
exports_ccase
file
find
findmerge
fmt_ccase
getcache
get
getlog
help
hostinfo
init_ccase
ln
lock
lsactivity
lsbl
lscheckout
lsclients
lscomp
lsdo
lsfolder
lshistory
ls
lslock
lsmaster
lspool
lsprivate
lsproject
lsregion
lsreplica
lssite
lsstgloc
lsstream
lstype
lsview
lsvob
lsvtree
makefile_aix
makefile_ccase
makefile_gnu
makefile_pmake
makefile_smake
makefile_sun
man
merge
mkactivity
mkattr
mkattype
mkbl
mkbranch
mkbrtype
mkcomp
mkdir
mkelem
mkeltype
mkfolder
mkhlink
mkhltype
mklabel
mklbtype
mkpool
mkproject
mkregion
mkstgloc
mkstream
mktag
mktrigger
mktrtype
mkview
mkvob
mount_ccase
mount
msdostext_mode
mvfslog
mvfsstorage
mvfstime
mvfsversion
mv
omake
pathnames_ccase
permissions
profile_ccase
promote_server
protect
protectvob
pwd
pwv
query_language
quit
rebase
recoverview
reformatview
reformatvob
register
relocate
rename
reqmaster
reserve
rgy_backup
rgy_check
rgy_passwd
rgy_switchover
rmactivity
rmattr
rmbl
rmbranch
rmcomp
rmdo
rmelem
rmfolder
rmhlink
rmlabel
rmmerge
rmname
rmpool
rmproject
rmregion
rmstgloc
rmstream
rmtag
rmtrigger
rmtype
rmver
rmview
rmvob
schedule
schemes
scrubber
setactivity
setcache
setcs
setplevel
setsite
setview
shell
snapshot.conf
softbench_ccase
space
startview
type_manager
umount
uncheckout
unlock
unregister
unreserve
update
version_selector
view_scrubber
vob_restore
vob_scrubber
vob_sidwalk
vob_snapshot
vob_snapshot_setup
wildcards_ccase
winkin
xclearcase
xcleardiff
xmldiffmrg
DESCRIPTION
The links created with the ln command (VOB symbolic links or VOB hard links) are cataloged in directory versions, in the same way as elements. By default, a link can be created in a directory only if that directory is checked out. A VOB link becomes visible to those using other views only after you have checked in the directory in which you created the link. (ln appends an appropriate default checkin comment to the directory version.)
In a snapshot view, this command executes the update command for elements affected by the link operation.
VOB Symbolic Links
A VOB symbolic link (created when you use the –slink option) is a separate, unversioned object. It contains a character string, the link text, in the form of a pathname. You can attach attributes and hyperlinks—but not version labels—to a VOB symbolic link.
You cannot check out a VOB symbolic link. To revise a VOB symbolic link, check out its directory, remove the link with rmname, create a new link, and check in the directory. (Note that if you use the –nco option, the checkout and checkin steps are not required.)
VOB Symbolic Links in UNIX
We recommend that you use relative VOB symbolic links instead of absolute VOB symbolic links. Absolute VOB symbolic links require you to use absolute pathnames from the VOB tag level; if the VOB mount point should change, the link becomes invalid.
VOB Symbolic Links in Windows
VOB symbolic links that point to files outside the ClearCase MVFS are not supported by the Windows operating system. Although the ln command creates the link, the link does not appear in a standard directory listing; it is displayed only by the cleartool ls command. (This is true for all symbolic links that do not point to a valid MVFS pathname.)
We recommend that you use relative VOB symbolic links instead of absolute VOB symbolic links. Absolute VOB symbolic links require you to use absolute pathnames from the view tag level and are therefore valid only in the view in which they were created.
Note: Although an absolute VOB symbolic link that includes the view tag at the beginning works when you are in the view, an absolute VOB symbolic link pointing to a pathname that begins with a VOB tag (for example, cleartool ln \my_vob\file my_link) does not work.
VOB Hard Links
A VOB hard link (created if you omit the –slink option) is an additional name for an existing element. We recommend that you use VOB symbolic links instead of VOB hard links whenever possible.
VOB Hard Links in UNIX
In UNIX, you cannot make a VOB hard link to a derived object, but you can make additional UNIX system hard links (created with ln(1)) to a derived object. The links are visible in your view, but are not part of the VOB. For more information, see Building Software.
VOB Hard Links in Windows
When you check out a VOB hard link (that is, check out the element it names), all the other names for the element are listed by (cleartool) ls as checkedout but removed and do not appear in Windows Explorer. The element is checked out, but there are no view-private files having the other names. The command lscheckout –all lists the checked-out element only once.
After you check in the element or cancel the checkout (using uncheckout), the other names for the element are listed by (cleartool) ls as disputed checkout, checkedout but removed and do not appear in Windows Explorer. To update the state of the other names, use the setcs –current command.
VOB Hard Links and Directory Merges
The merge and findmerge commands can merge both file elements and directory elements. Merging versions of a directory element can involve creating a VOB hard link to a directory or removing a VOB hard link from a directory:
- Working on a subbranch, a user checks out the directory /src, and then either uses mkdir to create directory element /testing within /src or uses rmname to remove /testing from /src.
- When the subbranch is merged back into the main branch, a hard link named testing is made in (or removed from) a main-branch version of src, referencing the directory element already cataloged in the subbranch version.
ClearCase and ClearCase LT allow creation of hard links to directories only in this directory-merge context: the two links (both named testing in the example above) must occur in versions of the same directory element (/src in the example above).
RESTRICTIONS
Identities
No special identity is required if you checked out the directory. To use the –nco option, you must have one of the following identities:
OPTIONS AND ARGUMENTS
Event Records and Comments
- Default
- Creates one or more event records, with commenting
controlled by your .clearcase_profile file (default: –nc).
See the comments reference page. Comments
can be edited with chevent.
- –c·omment comment | –cfi·le comment-file-pname |–cq·uery | –cqe·ach | –nc·omment
- Overrides the default with the option you specify.
See the comments reference page.
Specifying the Element to Which the Link Points
- Default
- None.
- pname ...
- Specifies an existing element to which a link
is to be created. Each pname must be a standard
or view-extended pathname. For VOB hard links, each pname must
specify an existing element that is not a VOB symbolic link and that resides
in the same VOB as the link being created. For VOB soft links, pname need
not reside in the same VOB as the link to it.
Specifying the Name of the Link
- Default
- None.
- target-pname
- A pathname that specifies the name for the VOB
link to pname. An error occurs if an object already
exists at target-pname. For a VOB hard link, pname and target-pname must reside in the same VOB; this restriction does not apply to VOB symbolic
links.
- target-dir-pname
- The pathname of an existing directory element
in the same VOB as the pname argument. ln creates
a new link in this directory for each preceding pname argument.
Note: This form of the command is intended for the creation of VOB hard links. If you use this form to create VOB symbolic links, make sure the links do not point to themselves. For example, the following command creates circular links:
cleartool ln –s file.txt dir1
Link created: "dir1/file.txt".
cd dir1
ls –l
lrwxrwxrwx 1 smg user 8 May 12 13:36 file.txt -> file.txtThe following command creates symbolic links that are not circular:
EXAMPLES
The UNIX 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 shell or Windows command interpreter prompt, followed by the cleartool command. In cleartool interactive mode, cmd-context represents the interactive cleartool prompt.
Note: In the UNIX examples that follow, arguments and output that show multicomponent VOB tags are not applicable to ClearCase LT, which recognizes only single-component VOB tags. In this manual, a multicomponent VOB tag is by convention a two-component VOB tag of the form /vobs/vob-tag-leaf—for example, /vobs/src. A single-component VOB tag consists of a leaf only—for example, /src. In all other respects, the examples are valid for ClearCase LT.
- Create a VOB hard link, hw.c, as another name for element hello.c.
- Create a VOB symbolic link, messages.c, pointing to msg.c.
- Create a group of hard links in the subd directory for all .h files in the current working directory.
- As a member of the ClearCase administrators group (ClearCase) or logged in at the ClearCase LT server host as the local administrator (ClearCase LT), create a VOB symbolic link in the checked-in directory version \vobs_hw@@\main\3 that points to hello.c in the current working directory.