Relative pathnames, Pathname length, Relative pathnames pathname length – HP NonStop G-Series User Manual

Page 29: Relative and full pathnames

Advertising
background image

Relative Pathnames

Relative pathnames do not begin with / (root). Instead they define a path that is relative to either
the directory you are currently working in or your home directory.

You can specify a relative pathname in one of four ways:

As the name of a file in the current directory.

As a pathname that begins with the name of a directory one level below your current directory.

As a pathname that begins with .. (dot dot, the relative pathname for the parent directory).

As a pathname that begins with . (dot, which refers to the current directory). This relative
pathname notation is useful when you wish to run your own version of a command in the
current directory.

NOTE:

Every directory contains at least two entries: .. (dot dot) for the parent directory

and . (dot) for the current directory.

In

Figure 4

, for example, if your current directory is /chang, the relative pathname for the file 2Q

in directory /plans is plans/2Q. By comparing this relative pathname with the full pathname
for the same file, /user/chang/plans/2Q, you can see that using relative pathnames means
less typing and more convenience.

Figure 4 Relative and Full Pathnames

In the OSS shell you can also use a ~ (tilde) at the beginning of relative pathnames. The tilde
specifies a user’s home directory. For example, to specify your own home directory, use the tilde
alone. To specify the home directory of user chang, specify ~chang.

If there are other users on your system, you may or may not be able to access their files and
directories, depending upon the permissions set for them. For more information about file and
directory permissions, see

Chapter 10 (page 121)

.

Pathname Length

Pathnames can have a maximum length of 1023 characters.

OSS Pathnames

29

Advertising
This manual is related to the following products: