Unable to report bug

C de-Avillez hggdh2 at ubuntu.com
Wed Dec 5 17:27:10 UTC 2018


On Wed, Dec 5, 2018 at 10:30 AM C de-Avillez <hggdh2 at ubuntu.com> wrote:

<snip/>

> We know they are soft links because of the first character in the
> permissions field: 'l'. You
> now 'cd 06-ISO'. Since '06-ISO' is a soft link, your CWD is now moved
> to the *actual* directory
> pointed to by the soft link: /data/LIBRARY/06-ISO.
>
> And, from now on, any directory command will be based on the CWD,
> which is /data/LIBRARY/06-ISO, *not*
> ~/Downloads/06-ISO.
>
> So, if this is what you were trying to report, it is working as expected.

Erm...

confused myself.

You are mixing 'cd' (which is a shell command) with 'ls' (which is
part of coreutils).

For example:

I created, under ~, two directories: ~/test, and ~/test/test1:
cerdea at piatam:~$ ls -la test
total 12
drwxr-xr-x  3 cerdea cerdea 4096 Dec  5 10:42 ./
drwxr-xr-x 69 cerdea cerdea 4096 Dec  5 11:04 ../
drwxrwxr-x  2 cerdea cerdea 4096 Dec  5 10:43 test1/

I also created a soft link ~/test-sl -> test/test1:

cerdea at piatam:~$ ls -l | grep test-sl
lrwxrwxrwx   1 cerdea cerdea      10 Dec  5 10:44 test-sl -> test/test1/

Now, under ~, I cd to test-sl:

cerdea at piatam:~$ cd test-sl
cerdea at piatam:~/test-sl$ pwd
/home/cerdea/test-sl
cerdea at piatam:~/test-sl$ echo $OLDPWD
/home/cerdea

So bash knows I am under a soft-linked directory, and shows me that.

Now I 'ls ..':

cerdea at piatam:~/test-sl$ ls ..
test1/

And ~/test1 is shown -- correctly, since 'ls' uses the *actual* path.

But bash, being helpful, still use $OLDPWD to 'cd -' or 'cd ..':

cerdea at piatam:~/test-sl$ cd -
/home/cerdea
cerdea at piatam:~$


--
..hggdh..



More information about the Ubuntu-quality mailing list