Strange behaviour of the "cd" command

Dr Rainer Woitok rainer.woitok at gmail.com
Mon Jul 10 12:58:25 UTC 2017


Greetings,

On a rather fresh installation of Kubuntu 16.04 I ran into the following
problem:

General information:

$ uname -a
Linux tux 4.4.0-81-generic #104-Ubuntu SMP Wed Jun 14 08:17:06 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux
$ echo $SHELL
/usr/bin/ksh
$ unset CDPATH
$ ls -la / | head -4
total 116
drwxr-xr-x  24 root root  4096 2017-06-26 19:05 .
drwxr-xr-x  24 root root  4096 2017-06-26 19:05 ..
drwx------   2 root root  4096 2016-05-25 11:19 .cache
$ cd /.cache
/usr/bin/ksh: hist[7]: cd: /.cache: [Permission denied]

The above message is exactly what one would expect, and thus ok.

$ cd
$ pwd
/home/rainer
$ ls -la ../../ | head -4
total 116
drwxr-xr-x  24 root root  4096 2017-06-26 19:05 .
drwxr-xr-x  24 root root  4096 2017-06-26 19:05 ..
drwx------   2 root root  4096 2016-05-25 11:19 .cache
$ cd ../../.cache
/usr/bin/ksh: hist[11]: cd: /cache: [No such file or directory]
$ pwd
/home/rainer

However, the error message above  is definitely not what I had expected!
In the error message mind in particular the missing dot in "/cache".

What's happening here?

Sincerely,
  Rainer




More information about the ubuntu-users mailing list