( inode), , , (..), . "" "" . getcwd (3), ; Linux , , .
, bash, PWD, , , , . .
/bin/pwd getcwd (3), .. ; -L, PWD ( , ). ( Gnu/bin/pwd , , .)
Bash pwd , ; (.. ). pwd set -o (on) + o (off is plus!). ( ) .
cd /tmp
mkdir real
ln -s real sym
cd sym
pwd
pwd -L
pwd -P
/bin/pwd
/bin/pwd -L
/bin/pwd -P
rm /tmp/sym
pwd
/bin/pwd -L
rmdir /tmp/real
pwd
/bin/pwd
, , "" ; . , , , ... , , .. , :
mkdir -p /tmp/dir/subdir
ln -s /tmp/dir/subdir /tmp/a
cd /tmp/a
ls ..
(cd .. ; ls)
, ~/.bashrc set -o
, !
,
J.
PS Linux Gnu bash; , .