Tilde notation
A ~ (tilde) can be used from the z/OS® shell in several forms:
Notation | Meaning |
---|---|
~ | Your home directory (that is, the directory given by your HOME environment
variable). The command:
copies file1 in
your home directory into file2 in your working directory. This
works regardless of what your working directory is.
copies file1 from
the working directory into dir in your home directory. |
~ + | The variable $PWD (which contains the name of your working directory). |
~ – | The variable $OLDPWD (which gives the name of the working directory you were in immediately before the last cd command). |
~login name | That user's home directory. Example: To display the profile file of allane, from that user's home directory, issue:
This
is useful if there are a group of you working on a project and you
have read-write access to some of each other's files. Note: In the z/OS shell, your login name is
your TSO/E user ID.
|