UsingMac.com

All About Apple Mac

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/*

4 COMMENTS (RSS)

MacTipper

May 24th, 2008 Time: 12:12 AM

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/

1

Wendy

May 24th, 2008 Time: 12:17 AM

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

2

Patrix

May 24th, 2008 Time: 04:10 AM

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

3

Malista

July 10th, 2008 Time: 02:23 PM

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

4

LEAVE.A.COMMENT

Your Name:

Your Email:

Your Website: