5 Most Useful Terminal Command Utilities

May 23, 2008 in Popular, UNIX, Open Source, Utilities | 7 Comments

ADVERTISEMENTS

Until now, I've already collected and posted around 60 Terminal commands that can be used to tweak your Mac preferences; There are :

  1. Leopard Tweaking - Terminal Codes
  2. Leopard - Terminal Commands for Desktop
  3. Leopard Tweaking - Another Terminal Commands
  4. Change Terminal Focus with Mouse Over

Those are quite difficult to remember. But these next 5 Terminal command utilities must be easy to remember:

5. Calendar

cal Sep 1988

Show you the generated calendar at September 1988. Try playing around with other month and year.

   September 1988
Su Mo Tu We Th Fr Sa
             1  2  3
 4  5  6  7  8  9 10
11 12 13 14 15 16 17
18 19 20 21 22 23 24
25 26 27 28 29 30

4. Software Update

sudo softwareupdate -i -a

This command line helps you install all software updates available on Apple. If you want to install only recommended software updates, you can use:

sudo softwareupdate -i -r
Password:
Software Update Tool
Copyright 2002-2007 Apple

No updates are available.

3. Activity Monitor

top

The returned result is your currently running processes' details. Like shown below.

Processes:  61 total, 3 running, 58 sleeping... 238 threads             21:03:36
Load Avg:  0.45,  0.64,  0.79    CPU usage: 21.50% user, 13.08% sys, 65.42% idle
SharedLibs: num =    2, resident =   78M code,     0 data, 5484K linkedit.
MemRegions: num =  8388, resident =  339M +   21M private,  171M shared.
PhysMem:  174M wired,  624M active,   44M inactive,  842M used, 1197M free.
VM: 4496M + 131M   33805(0) pageins, 0(0) pageouts

  PID COMMAND      %CPU   TIME   #TH #PRTS #MREGS RPRVT  RSHRD  RSIZE  VSIZE
  781 top          8.6%  0:01.63   1    18     28  652K   276K  1256K    18M
  622 installdb    0.0%  0:00.23   1    34     25  280K   196K   980K    19M
  553 top          0.0%  1:14.13   1    16     27  792K   276K  1396K    18M
  546 top          0.0%  0:00.34   1    16     27  492K   276K  1096K    18M
  502 top          0.0%  0:00.43   1    16     27  496K   276K  1100K    18M
  467 Adium        1.1%  0:33.87   4   214    392 8084K    27M    21M   216M
  462 Skype        0.1%  0:40.48  19   283    582   92M    24M    89M   384M
  454 mdworker     0.0%  0:02.28   4    71     53 1436K  6472K  3744K    33M
  282 bash         0.0%  0:00.11   1    14     19  320K   196K  1076K    18M
  281 login        0.0%  0:00.03   1    17     49  256K   200K  1024K    19M
  257 Terminal     4.1%  0:31.91   4   108    158 2792K    16M  9104K   168M
  175 TextEdit     0.0%  1:14.82   7   165    189 2500K    27M  8292K   181M
  162 AppleSpell   0.0%  0:04.05   1    52     30  612K  7700K  4684K    34M
  157 mysqld       0.0%  0:04.31   9    40     56   10M   200K    13M    45M
  138 sh           0.0%  0:00.03   1    14     18  164K   196K   772K    18M
  121 Safari       9.2% 11:21.56  10   276-  2228  153M    44M   180M   428M
  116 Quicksilve   0.5%  0:55.46   4   113    315 8652K    26M    21M   207M
  111 Finder       0.0%  0:47.26   6   215    294 4388K    28M    16M   187M
  110 SystemUISe   0.2%  0:27.56   5   244    230 2488K    12M  7568K   159M 

2. IP Address

ifconfig | grep inet

Executing this particular command line will return your Mac ip address.

1. Hide Files

chflags hidden ~/Desktop/*

The most useful command line that can be used either to make your Desktop looks clean or to make prank of your friends. With this command, you hide all files in your Desktop folder.

To reveal them again..

chflags nohidden ~/Desktop/*

Keep Up to Date

We will come up with more and more interesting topics over the time, make sure to keep yourself up to date using RSS Feeds or Email Subscription.

Related Entries

Some articles taken from our resource base, tightly related to current article, to empower you with more knowledge on tweaking the most out of your Mac.

  1. Emacs. Bizarre Findings
  2. Safari 4 Beta. New Features and Tweaks
  3. Twiddle with Terminal Command Prompt
  4. Telnet's ASCII Animation: Star Wars
  5. Terminal Kills Process
  6. Fun with Terminal
  7. Terminal, Ruby and Quote of the Day
  8. Screen Capture a Window

7 Comments

12:12 AM

MacTipper

Wow! Thanks for the last one. I didn't know about it! Although, I'm wondering, do you need the Dev tools to do this. (I have them, so, I wouldn't know.) Thanks! MacTipper http://www.mactipper.com/

Reply | Back to Top

12:17 AM

Wendy <Webmaster>

As far as I know, we only need Leopard installed to use this feature

Reply | Back to Top

04:10 AM

Patrix

You can also use 'top -o cpu' to see the process list sorted by CPU usage.

Reply | Back to Top

02:23 PM

Malista

thanks for that, but how would you use the cal command to get weeks starting on Monday? cheers,

Reply | Back to Top

06:50 AM

Finseth

So, just did the chflags hidden ~/Desktop/* -> returned directory doesn't exist ... so tried without the * at the end, succeeded, now I have a folder on my desktop named Desktop - and I bloody well can't get rid of the bugger again ... Any ideas how to get this one outta there? Kinda wondering because chflags nohidden ~/Desktop/ doesn't work, writing it in, it's executed properly but then the folder is still there :S don't get it ^^

Reply | Back to Top

04:24 PM

Manav Fernandez

I recently upgraded to Leapord - while reloading Adium, i seem to have installed a chat preview software that gives me the text of any background chat in both Skype and Adium in the top right corner of my screen BUT i cant seem to get rid of it. HELP!!

Reply | Back to Top

02:29 AM

dustin

I just found this thread, tried the hidden Desktop thing and got the same effect...a desktop folder I can't get rid of. Did you ever solve this problem?

Reply | Back to Top

Post a Comment

Rest assure, your email address will be secured, encrypted and locked down to our treasure box. Upon filling your comment, we only allow <a>, <b> and <br> tags .

You can't be anonymous

C'mon, I'm sure you've got something to say.