
This time, I want to share several UNIX Utilities/commands that I use them everyday. Of course, ls, su, sudo are not included because as you know ehm.. ehm sure they are the most ‘important’ UNIX commands, at least for me. And hopefully this article may help many Mac OS X users, especially for newbie users…
And my favorite commands are:
1. top
This command has function to show table that contains list of program that’s currently running on your Mac computer (including program that running on background too). And how do to use this command? At console prompt, type top then hit Enter key and to exit from this command type q.

2. kill
You can force quit a locked program with this command. Yup, you can use the Activity Monitor and force quit the locked program with it. But this command can be a helpful command, for example if you want kill program at remote Mac OS X through telnet, you can use this command (Sometimes I feel it close faster than using GUI version). Unless you use sudo command, you can kill your ‘own’ program. My suggest is run top command first to get program ID number, and type kill -parameter id number. For example if you want close program Smultron that has ID number 975 (figure-1) and you want kill it with parameter KILL(non-catchable, non-ignorable) type kill -9 975 and Smultron will closed soon.

3. bc
If you are in UNIX shell environment and you need calculator, it means you need this command. I am very like this command because simple and fast (you are not having to open GUI calculator version or dashboard). To use it just type bc at prompt. And type the expression that want you calculate, for example type 2*3. That’s so simple, isn’t it? To exit from this command, types quit and then press ENTER.

4. open
You can open a file or more with its association program or you may open it with your chosen program. For example, if you want open Safari program, just type open -a Safari or you want open file test.htm with Safari just type open -a Safari test.htm. Maybe you think this command isn’t too useful, but wait for minutes… you can open all files with specified file name. For example you want open files that containing with word test, just type open -a Safari *test* and then press ENTER. And all files in the folder that have part name “test” will opened with Safari. This command can be more powerful if you use it into automated script.

5. ps
If you look another way to look all the programs that running on your Mac, even it invisible, just type ps -auxw and you will get the detail.

6. shutdown
You can shutdown your Mac instantly with this command. You need root user for run this command. To use this command just type shutdown -
sudo shutdown -h now and type your administrator password if you asked. You can also use this command to restart the computer, type sudo shutdown -r now.
7. gzip
This command to compress a file and delete it automatically. For example if you want compress file test.txt, type gzip test.txt. That’s so simple, isn’t it?

8. tar
If you’re a UNIX user, maybe you’re very like with this format if you want combining/compress multiple files. To use it type: tar -cf file.tar destination file/folder. For example if you want to combining file test.htm to test.tar, type tar -cf test.tar test htm and you files will combining them into one file with light speed and if you want combining and compress it type tar -czf test.tar /Document/test so all files inside test folder will combining and compress into test.tar

9. zip
Zip format is very popular with Windows user. Zip command will combining and compresses them. To use it type zip file_name.zip destination file/folder, for example if you want zip all files inside test folder type into my_file.zip file, type zip my_file.zip /Document/test/. For note:
a. For tar and zip you can zip multiple files with some criteria. For example if you want zip all files that containing word “s” in its filename, type zip my_file.zip *s*.
b. If you want get help on each command use info or man command, for example info zip or man gzip.
Hopefully, this article may help you….
(article no:0087)


















No Comment Received
Leave A Reply