Terminal: Browsing Applications

Mac OS X has an elegant way of installing and uninstalling applications, just drag an drop and application to your desired folder and you are done. But once in a while every 10 years or so you need to make a change manually but there aren’t any files to edit it was a just a single file. Well it isn’t, its actually a folder OS X just treats them differently then regular folders on you computer. If you need to edit a setting inside an application manually you can do so in command line (terminal).

To do it, open up a terminal and browse to the folder where the application is you can use the change directory command “cd”, you also don’t need to type the whole folder name just type a few characters and hit tab and it will complete it for you. Following is how Firefox looks on the inside.

$ ls /Applications/Firefox.app/Contents/
.               Info.plist      PkgInfo         Resources
..              MacOS           Plug-Ins

Most applications has the same structure when it comes to organizing files.

$ ls /Applications/Mail.app/Contents/
CodeResources              MailTimeMachineHelper.app/ Resources/
Info.plist                 PkgInfo                    version.plist
MacOS/                     PlugIns/

Files and executables are under ‘MacOS’ folder. This is where you should look for the file you are looking for. Another neat trick is, you don’t need to run an application from GUI (Graphical User Interface aka aqua). If you need to run Firefox from command line you can use…

$ /Applications/Firefox.app/Contents/MacOS/firefox-bin

Leave a Reply

Your email address will not be published.