System Administration Guide: Network Services

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 path names.

 

Absolute Path Names 

Abbreviated Path Names 

From Local System 

mars:/home/jones/myfile.txt

~jones/myfile.txt

After Remote Login 

/home/jones/myfile.txt

~jones/myfile.txt

Absolute path names identify files or directories that are mounted on a particular system. In the previous example, the first absolute path name identifies a file (myfile.txt) on the mars system. Abbreviated path names identify files or directories relative to a user's home directory, wherever it might reside. In the previous first example, the abbreviated path name identifies the same file, myfile.txt, but uses “~” symbol to indicate the jones home directory:

~ = mars:/home/jones

The examples on the second line demonstrate the user of absolute and abbreviated path names after a remote login. No difference is evident for the abbreviated path name. However, because the remote login operation mounted the jones home directory onto the local system (parallel to the local user's home directory), the absolute path name 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.

The following table provides a sample of absolute and abbreviated path names that are recognized by the C shell. The sample uses the following terminology:

Table 29–4 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