afile | adir | Relative pathnames | |||
./afile | ./adir | Relative pathnames | |||
/afile | /adir | Absolute pathnames |
$ pwd /home/user1 |
# Which is the current directory? | ||
$ cd adir | # Go to directory "adir" relative # to the current directory. |
||
$ pwd /home/user1/adir |
$ pwd /home/user1 |
# Which is the current directory? | ||
$ cd /adir | # Go to directory "/adir". | ||
$ pwd /adir |
. | the current directory | ||
.. | 1 directory higher up in the hierarchy |
$ cp | /tmp/afile | . | # Copy "/tmp/afile" to the # current directory. |
$ cd | adir | # Go to directory "adir" relative # to the current directory. |
|
$ cd | ./adir | # Will do exactly the same. |
$ acmd | # Search for program "acmd" via $PATH. | ||
$ ./acmd | # Execute program "acmd" # in the current directory. |
$ echo $PATH /usr/local/bin:/usr/bin:/bin:/usr/bin/X11:/usr/games |
# Check: which is the current search path? | $ export PATH=$PATH:. | # Modify the PATH variable. | $ echo $PATH /usr/local/bin:/usr/bin:/bin:/usr/bin/X11:/usr/games:. |
# Check: which is the current search path? |
Copyright (C) 2003 Integrated Services; tux4u.nl
Author: Ing.J.M.Waldorp
pathnames_en.html 20030403