I was just exploring the directory structure on my Mac and there's a directory in my root/home directory, named ls.

[~]$ ls -l .
drwxr-xr-x   6 XXXX  staff       192 Dec  8  2018 ls
[~/ls]$ pwd

Could someone help me understand what this directory holds and why is in the root?

The ls command should reference the /bin/ls command, I'm guessing. Anyone have any ideas?

  • 5
    Did you open the directory and look inside?
    – bmike
    Jun 16, 2019 at 21:53

1 Answer 1


That ls/ directory is not standard on Mac, so its something you or another user on the Mac have created (either directly, or indirectly by being created by some third party program).

It hasn't got anything to do with the ls command. However, it could reasonably have been made by someone in the middle of a mkdir command thinking that they should just list the directory first - and then erraneously running mkdir ls.

By the way - the directory /Users/xxxx is not called the root directory, but rather the user's home directory.

  • 5
    Sounds about right. I currently have -p and --help directories in my home directory, presumably from commands that were incorrectly piped into mkdir or similar. Jun 17, 2019 at 21:14

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .