Terminal not listing all folders in directory

Hi,


I'm on MacBook Pro (Retina, 15-inch, Mid 2014) OSx 10.11.5 El Capitan. I recently tried to cd to some folders which are definitely there and I get a no such file or directory. The folder has 18 subfolders but Terminal only lists 2 of them.


Thanks in advance

MacBook Pro (Retina, 15-inch, Mid 2014), OS X El Capitan (10.11.5)

Posted on Jun 5, 2016 5:23 AM

Reply
12 replies

Jun 5, 2016 11:43 AM in response to kristin.e

/Applications is completely different from /Users/username/Applications.


/Applications is where applications are normally stored and is available to all users on your Mac. /Applications is NOT in your home directory.


/User/username/Applications is seldom used and used only when an individual user has applications that is licensed only to them.

Jun 5, 2016 5:48 AM in response to kristin.e

UNIX machines abhor spaces in file and folder names, as the Terminal will rudely point out. You must enclose those space delineated names with quotes before any of the UNIX commands will operate on them.

# Either of the following accommodate spaces in file/folder names. Blue text only.

$ cd "Folder with spaces in its name"

$ cd Folder\ with\ spaces\ in\ its\ name

Jun 5, 2016 12:16 PM in response to Duane

Thanks @Duane - I used a different path and they all showed up. Previously I was doing

cd Applications/MAMP/htdocs and only 2 folders showed up


but then I did


cd /Applications/MAMP/htdocs and they all showed up


so could you explain this to me? When I type cd ~ in Terminal I am taken to my username home so I presumed that I don't need the first / before Applications. Many thanks for your help 🙂

Jun 5, 2016 12:30 PM in response to kristin.e

By default, MAMP will install into /Applications, where other applications are installed.


The ~/Applications folder is in your login directory, and by default, is empty, save for a hidden .localized file. This folder is human appendix metaphor, and conceivably could be used for scripts, and other executables that only you want access to on a multi-user Mac. I have a ~/bin directory for that purpose as it is a decades old UNIX habit.


The /Applications folder is owned by root and group admin, while the ~/Applications folder is owned by you.

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

Terminal not listing all folders in directory

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.