problem with linked directory

Sean 'Shaleh' Perry shalehperry at attbi.com
Tue May 7 14:34:21 EDT 2002


one:/tmp/bar$ ls -al
total 29
drwxr-xr-x    2 shaleh   users        1024 May  7 11:32 .
drwxrwxrwt   17 root     root        27648 May  7 11:31 ..
lrwxrwxrwx    1 shaleh   users          12 May  7 11:32 izz -> /tmp/foo/waz
one:/tmp/bar$ cd izz
one:/tmp/bar/izz$ pwd
/tmp/bar/izz
one:/tmp/bar/izz$ cd /tmp/foo/waz/
one:/tmp/foo/waz$ pwd
/tmp/foo/waz

As you can see, pwd is the dir you are by name.  A symlink creates a new name.
You should be able to stat the directory name to find out if it is a symlink
and get the true name from that information.





More information about the Python-list mailing list