Search code examples
linuxls

Result of ls contains folders with empty names


The IT guys in my company grant me permissions so that I can ssh onto a server.

However when I invoked command ls -alh / it shows: Root

As you can see there are many directories shown with empty names (except for those with permission rwxrwxrwt). This also happens in my home folder: Home folder

Another weird thing is I can cd to one of the "hidden" folders like /mnt even if I can't "see" it.

In what condition could this happen? Is my permission set incorrectly by IT guys?


Solution

  • Most likely, ls is aliased in such way that it is invoked as ls --color which somehow messes with terminal settings. You may list all aliases by running alias. Your options:

    1. Run ls as ls -alh --color=none
    2. Remove alias (affects current session only): unalias ls