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.
|
Absolute Pathnames |
Abbreviated Pathnames |
---|---|---|
From Local System |
mars:/home/jones/myfile.txt |
~jones/myfile.txt |
After Remote Login |
/home/jones/myfile.txt |
~jones/myfile.txt |
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 might 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".
The table below provides a sample of absolute and abbreviated pathnames recognized by the C shell. It uses the following terminology:
Working directory - The directory from which the rcp command is entered. Can be remote or local.
Current user - The user name under which the rcp command is entered.
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 |