shell - How to move one directory back in unix / linux when path contains symbolic links? -


i have created symbolic link nested directory. using symbolic link can move directory home directory. want move 1 directory target directory shell comes home directory.

[root@pe1800xs ~]# pwd /root  [root@pe1800xs ~]# mkdir -p abc/def/ghi/jkl/mno/pqr  [root@pe1800xs ~]# ln -s abc/def/ghi/jkl/mno/pqr/ xyz  [root@pe1800xs ~]# cd xyz  [root@pe1800xs xyz]# pwd /root/xyz  [root@pe1800xs xyz]# pwd -p /root/abc/def/ghi/jkl/mno/pqr  [root@pe1800xs xyz]# cd ..  [root@pe1800xs ~]# pwd /root 

what want achieve when cd.. in pqr directory shell should come mno directory.

you must use

cd -p xyz 

to enter directory follow original structure of folders, can move wish because have resolved link real path.


Comments

Popular posts from this blog

How do you change vbulletin's home page to the forums instead of the default (CMS or Activity Stream)? -

c++ - Troubles when compiling phash program -