Документ взят из кэша поисковой машины. Адрес
оригинального документа
: http://comet.sai.msu.ru/UNIXhelp/tasks/links3.2.1.html
Дата изменения: Fri Jan 17 12:43:24 1997 Дата индексирования: Tue Oct 2 01:21:58 2012 Кодировка: Поисковые слова: п п п п п п п п п п п п п р п р п р п р п р п р п |
There is a subtle difference between a "normal" directory and a directory created with a symbolic link to another directory.
What happens if you do a cd (change directory) to this type of directory? You are placed in the directory that the symbolic link points to.
This can be confusing, especially if you have changed your shell prompt so that it displays the current working directory.
Look at this example:
pwd (print the user's working directory) /usr/home/john/tmp ln -s $HOME/accounts/may fifth (use a symbolic link named fifth that points to the directory $HOME/accounts/may) ls fifth cd fifth (change directory to the new directory) pwd (print the working directory) /usr/home/john/accounts/may (the user is actually in the the directory that the linked directory points to)
When the user does a cd (change directory) to the symbolically linked directory may in their current working directory, they change to the directory that this link points to, the directory /usr/home/john/accounts/may.