Let's have a look at the followings:
radu@Radu:~$ mkdir test radu@Radu:~$ cd test radu@Radu:~/test$ rmdir ~/test radu@Radu:~/test$ man ls man: can't change directory to '': No such file or directory
Normally, I would say that the last line from the previous output from my terminal is an error. But how can I understand it? And why does this appear only in the case of
man command (as far as I know; even
ls does not have any problem)?
Furthermore, let's see again:
radu@Radu:~/test$ man ls man: can't change directory to '': No such file or directory radu@Radu:~/test$ echo $? 0
What? It was a success (see the output of
man man |& grep -A 1 '^EXIT STATUS$')?
Another version of man
When attempted with another version of
man the same thing works.
$ mkdir mantst $ cd mantst/ $ man ls <--- works $ rmdir ../mantst/ $ man ls <--- works $ man --version man 2.6.3