Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trialIan Mackenzie
11,062 PointsFinding an executable file within a directory on Mac
I'm trying to local the full path of the executable within a directory, the sublime text 3 directory to be more precise. What commands should I use on Mac's Terminal to local this?
3 Answers
Philip Cox
14,818 PointsHello Ian. I would enter the Terminal, change directory 'cd' to Applications, run list command 'ls'. This will show you all your applications. Is you see Sublime 3, cd into the folder, list command with option a will show all files in the Sublime directory ls -a including hidden ones, ls -la will show all files in the long version. -rwx- will be present. If the file has the x of read, write, execute then it's executable.
Hope this helps.
Ian Mackenzie
11,062 PointsThanks for your reply Phillip,
After the ls command it shows the directory as Sublime Text.app and it won't let me cd into that folder. Is this a normal folder or a special type of folder due to the .app extension?
Philip Cox
14,818 PointsThat will most likely be the exe. You can also go into finder and search in Applications for the app. Right click and show contents, this may be an easier way to locate your file. This may also help you navigate in the Terminal once you know your path.
Ian Mackenzie
11,062 PointsOk, thanks Phillip.