Monday, January 5, 2009

Terminal Commands: Mods under the hood!

Linux/Unix before they get the nice GUI with the windows, the cursor and al the Jazz, it was all command line. A command line that was and is, super powerful. It is still under the MacOS X, but kinda hidden all the way in the Utilities Folder in the Applications folder. The terminal can be used to do different "undoable tasks" like opening and viewing Hidden folder. The most basic command in this is "cd" derived from the acronym change directory. So once you open your terminal you will be greeted by a line such:

[computer name]:~[user name]$

That is the prompt and that 's where you input your commands. If you type now "ls" derived from the word list, you will get a list of the objects in that directory. But if you type "ls -a" you will get all the files (a stands for all) and that will show you even the hidden files usually starting with ".". The command "pwd" will give you the Present Working Directory.

But those simple navigation tools are not what I love about terminal. I like the ability to do changes to Applications, beyond the simple Preferences pane. My favorite blog, TUAW, has a section on terminal tips, and from there I picked those that I love the most.

Enabling half star rating in iTunes: This is something that iTunes is doing anyway base on the number you heard a song, but you cannot do! Just open the terminal and type:
defaults write com.apple.iTunes allow-half-stars -bool TRUE
Replasing TRUE with FALSE will revert the changes.

Change Time Machine intervals: This one is in particularly useful. You can change the time itenrval from 1 sec all the way to one week. Just type
sudo defaults write /System/Library/LaunchDaemons/com.apple.backupd-auto StartInterval -int [time in secs]
The time input is given in secs so the default one hour is 3600, one day is 24x3600=86,400. I don 't know why Apple does not give this option but it is for sure something needed. But we just gave you the solution!

Add a shortcut of the recent apps on the dock. This one is useful if you hate (and I am sure you do) togo from the apple menu and select recent items. There are about 1o apps I mainly use so there are almost always there! Just type:
defaults write com.apple.dock persistent-others -array-add '{ "tile-data" = { "list-type" = 1; }; "tile-type" = "recents-tile"; }'
And that will anable it. If you are tired of it, just drag it out of the dick. Simple as this.

For more terminal tips check out the TUAW section on it.

No comments:

Post a Comment