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
/Users/XXXX/ls
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?
Best Answer
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 amkdir
command thinking that they should just list the directory first - and then erraneously runningmkdir ls
.By the way - the directory
/Users/xxxx
is not called theroot
directory, but rather the user's home directory.