On Wed, Apr 1, 2015 at 3:42 PM, santosh <[email protected]> wrote: > On Wed, Apr 1, 2015 at 5:48 PM, Denys Vlasenko <[email protected]> > wrote: >> On Wed, Apr 1, 2015 at 4:39 AM, santosh <[email protected]> wrote: >>> Hello! >>> >>> I have a link to directory. >>> >>> /var/test --> /hdd1/test. >>> >>> /$pwd >>> / >>> $cd /var/test >>> /hdd/test$ >>> >>> The prompt's PS1 w should displays real directory name. >>> I like it to display like >>> >>> /var/test$ >>> >>> Is there anything I can configure to get this behavior? >> >> No. >> >> In Unix, current directory is always physical. >> You can't really "cd to a symlink". >> When you do that, your current directory >> will be where symlink points to, not the symlink. > > But busybox ash prompt displays physical unlike bash..
I know. Bash is lying to you. > Here I'm pasting the output from bash and busybox ash. > > BASH: > root@cmx52:~# ll /var/test > lrwxrwxrwx 1 root root 10 Apr 1 13:35 /var/test -> > /hdd1/test > root@cmx52:~# echo $PS1 > \u@\h:\w\$ > root@cmx52:~# cd /var/test > root@cmx52:/var/test# pwd > /var/test Yes, bash shows that, but the *real* getcwd system call returns "/hdd1/test" in this case. You *can't* have a symlink as a current directory. It's just not possible in Linux. _______________________________________________ busybox mailing list [email protected] http://lists.busybox.net/mailman/listinfo/busybox
