Документ взят из кэша поисковой машины. Адрес
оригинального документа
: http://comet.sai.msu.ru/UNIXhelp/concepts/pathfile2.1.html
Дата изменения: Fri Jan 17 12:43:14 1997 Дата индексирования: Tue Oct 2 02:29:56 2012 Кодировка: Поисковые слова: ic 4603 |
To give a relative path to a file below your current directory:
pwd (prints the current directory) /home/eucs/jane (the full pathname to the current directory) ls -l presentation/docs/oview.html (lists information on the file)
This defines the file oview.html in the directory docs which is in the directory presentation which itself is a directory in the current directory.
To define a file that is in another directory:
pwd (prints the current directory) /home/eucs/jane/presentation/docs (the full pathname) cd ../illustrations (use relative pathname) pwd (check the current directory) /home/eucs/jane/presentation/illustrations
The user jane uses the relative pathname ../illustrations to move up to the directory presentation and then down into the directory illustrations.
To give a pathname using the ~ character:
cp ~fran/tmp/for_mike.txt
This copies the file for_mike.txt from the directory ~fran/tmp. The ~ (tilde) character is used to save giving the full pathname to fran's home directory.