If you are a UNIX geek and have switched to Mac, here are some great Mac OS X tips that will help you find what you need and do what you want to do on Mac OS X more easily.
1. Where's The Shell?
A Unix geek will not be able to do much without a shell. If you are new to Mac and can’t find the Terminal application, just navigate to the /Applications/Utilities folder and you will find it right there. For quick access to the application, drag the icon of the Terminal application onto your OS X dock.
When you run the Terminal, it will start with the default user shell “bash". If you wish to change the startup shell, you can do so by selecting Preferences in the Terminal menu. You can also customize settings and appearance of the Terminal by selecting Windows Settings in the Terminal menu.
In Mac OS X, the root user account is disabled by default. If you want to use the root account, use the sudo command. The sudo command allows you to run a command as a super user. You can use the sudo command by passing it the command you want to run along with the argument, for example: sudu vi filename.txt. To use root, you must be a user with administrative rights.
If you want a root shell, use sudo bash or sudo tcsh. If you wish to enable the root user, simply use this command sudo passwd root.
3. Paste Complete Path
You can easily drag your files or folders from Finder to the terminal window. It will paste the complete path to that particular item in the shell. It is useful when you want to insert long paths into the shell.
4. Filesystem Layout
When you open the Finder to the very top-level of your disk, you will notice that /usr and /var are missing. These folders are actually hidden. If you want to unhide them, open up the shell and use this command ls/ and you will see those folders.
5. Different Types of Hidden Files
In many Unix flavors, a file can be made invisible by prefixing it with a dot (“."), for example /.vol. You can prefix a dot to any Mac file and it will become invisible in the Finder. Mac OS X also uses a file .hidden that maintains a file list that should be hidden.
Also, the HFS+ files and directories can be made hidden with the SetFile command. This command can be found in the /Developer/Tools folder after installing the Mac OS X Developer Tools package. Note that the changes will not take effect unless the Finder is re-launched.
6. Aliases and Links
In Mac OS X, you can create links to your files in two ways. The first one is to select a file from the Finder, hold down the Command and Option keys and drag the file to a new location. This will create an alias that Carbon, Classic and Cocoa applications can easily follow. But Unix applications will ignore these links, viewing them as 0 byte files.
The other way to create a link is by giving a command ln or ln –s. Using this kind of link will allow Carbon, Unix, Classic and Cocoa applications to follow it.
Mac OS X comes with X11, the X-Windows System. It uses a sophisticated graphics system for native applications, called Aqua . If you want to run X11 applications, Apple has its own implementation integrated with Aqua. And, there is an installer for it that comes in Mac OS X installation disc.
You might find some Unix applications missing on Mac OS X. Check out Fink, which lets you modify a world of Unix applications so that they can run on Mac OS X. The Fink website also contains a large number of other impressive applications.
9. Adding New User Or Group
If you have come to Mac OS X from Unix operating system, you might think that you can add new users and groups in the /etc/passwd and /etc/group files. But this is not possible; however, If you wish to add a new user or group, you can use Mac OS X’s Directory Services.
10. Copying And Pasting Text
The vi editor in Mac OS X allows you to paste text directly from OS X clipboard. It is great for copying any text from a graphical application. It also lets you copy text from the shell and paste it in any GUI application.
-- This my my list of top 10 Mac OS X tips for Unix users. If you know any other tip that can help a unix user find what he needs or do what he wants on Mac OS X, please do share it with us in the comments section below.
-- Also learn about the top Mac OS X command line utilities, here