System Administration Guide

Specifying Source and Target

With the rcp command in the C-shell, you can specify source (the file or directory you want to copy) and target (the location into which you will copy the file or directory) with either absolute or abbreviated pathnames.

Graphic

Absolute pathnames identify files or directories mounted on a particular system. In the example above, the first absolute pathname identifies a file (MyFile.txt) on the mars system. Abbreviated pathnames identify files or directories relative to a user's home directory, wherever that may reside. In the first example above, the abbreviated pathname identifies the same file, MyFile.txt, but uses "~" symbol to indicate the jones home directory. In effect . . .

~ = mars:/home/jones

The examples on the second line, above, demonstrate the user of absolute and abbreviated pathnames after a remote login. There is no difference for the abbreviated pathname, but because the remote login operation mounted the jones home directory onto the local system (parallel to the local user's home directory), the absolute pathname no longer requires the system name mars. For more information about how a remote login operation mounts another user's home directory, see "What Happens After You Log In Remotely".

Table 46-3 provides a representative sample of absolute and abbreviated pathnames recognized by the C shell. It uses the following terminology:

Table 46-3 Allowed Syntaxes for Directory and File Names

Logged in to 

Syntax 

Description 

Local system  

.

The local working directory 

 

path/filename

The path and filename in the local working directory

 

The current user's home directory 

 

~/path/filename

The path and filename beneath the current user's home directory

 

~user

The home directory of user

 

~user/path/filename

The path and filename beneath the home directory of user

 

remote-system:path/filename

The path and filename in the remote working directory

Remote system 

.

The remote working directory 

 

filename

The filename in the remote working directory

 

path/filename

The path and filename in the remote working directory

 

The current user's home directory 

 

~/path/filename

The path and filename in the current user's home directory

 

~user

The home directory of user

 

~user/path/filename

The path and filename beneath the home directory of user

 

local-system:path/filename

The path and filename in the local working directory