While I was going through a unix system I found Five, two directories with same name listed on the same path, when I did a ls -Dl
Here is the view, Why I said Five, Two Directories with same name.....
//11/# ls -Dl
total 553
drwxrwxr-x  2 root      root          12288 Dec 20  2010 bin
drwxrwxr-x  2 root      root          16384 Sep 28  2010 bin
drwxrwxr-x 11 root      root           4096 Oct 25 06:49 etc
drwxrwxr-x 11 root      root           8192 May 17 07:40 etc
drwxrwxr-x  3 root      root           4096 Sep 28  2010 qnx4
drwxrwxr-x  4 root      root           4096 Jul 26  2010 qnx4
drwxrwxr--  4 root      root           4096 Sep 28  2010 registry
drwxrwxr-x  4 root      root           4096 Aug 31  2008 registry
drwxrwxr-x 16 root      root           4096 Sep 28  2010 usr
drwxrwxr-x 17 root      root           4096 May 27 03:49 usr
How can this be possible?? what will happen if I cd any one of them, which directory i'll end up in??
There is another way of looking at it, when I did ls -liF the directories listed here came up with different inodes. and were not even symbolic links or anything.???
Please explain this to me??
You should use all these commands to check what are various characters (including hidden ones) in your filename:
printf "[%s]\n" *
printf "%s\n" * | cat -vte
printf "%s\n" * | od -bc
Last one will also dump each dump each character in octal and ascii.
use ls -b, if you found any "\" appended after your folders or files, that should be spaces.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With