Tiger secrets declassified

More Stories in this Series

Utility software

Tiger Secrets: Troubleshooting and Terminal

You don’t have to be a geek to find these tips handy. Whether you’re battling backup crashes on .Mac or searching for lost files, these tips on troubleshooting and Terminal will give you some clever ways to crack Tiger’s code.

Modify the iTunes message format in iChat AV

When you use iChat’s new Current iTunes Track status-message option to show others what you’re listening to, it displays the iTunes information as Song Name - Artist Name. But many people prefer to see the artist’s name first (see “iChat Your Way”). To set your own display format, quit iChat and open Terminal (/Applications/Utilities). Enter

defaults write com.apple.iChatAgent iTunesMessageFormat -string '%Artist - %Track'
.

Next, to restart the background process that controls iChat, type

killall iChatAgent
. When you relaunch iChat, you should see your newly formatted message. If you see
%Artist - %Track
instead, select another status message and then select the Current iTunes Track message. All should be fine.

There are other options available, too—try adding

%Album
,
%Year
, or
%URL
if you want. Just remember that there’s a 42-character limit. —Rob Griffiths

Uncover unused files

Have you ever wanted to remove unused files from a folder—for example, your user folder’s Preferences folder? Finding the files isn’t always easy—naming schemes are sometimes obvious only to the developer.

iChat Your Way Change the way iChat’s iTunes track listing lists your current hits.

Enter Spotlight and the Unix

mdls
command. ( Click here for more information.) In this case, we’ll use
mdls
to look at the kMDItemAttributeChangeDate attribute to track changes to a file’s metadata, which is modified every time you or a program access the file.

For example, to see when your Dock’s preferences were last updated, you type

cd ~/Library/Preferences
(to change to your Preferences directory) and then type
mdls com.apple.dock.plist | grep kMDItemAttributeChangeDate
.

When I enter the command, I get back

kMDItemAttributeChangeDate = 2005-06-21 20:39:44 -0700
.

Now I know that the file was last changed on June 21. When you’re thinking about deleting something, use this trick first to quickly find out whether or not the unknown file has been accessed recently. —RG

Get file paths fast

OS X has always let you drag a file or folder to the Terminal window to add its path to a command. However, you had to switch to the Finder, make sure the Terminal window was visible, and then drag the item into that window. Now you can simply copy the file or folder and then paste it into the Terminal window to add its path. —Kirk McElhearn

Save time in Terminal

If you’re a Terminal maven, you’ll be happy to know that in order to correctly copy or move files containing resource forks, you no longer need to use Apple’s special

CpMac
and
MvMac
commands. The Tiger versions of the commands,
cp
and
mv
, are resource-fork- compatible. —KM

Protect information with Access Control Lists

Unix geeks will appreci-ate that Tiger supports Access Control Lists (ACLs). ACLs give you more control over permissions than you get from OS X’s Info windows or even from standard Unix commands. For example, you can use ACLs to set unique access permissions for everyone who has an account on your Mac.

ACLs are enabled by default only in Mac OS X Server. But you can easily turn this feature on in the standard version of Tiger. In Terminal, type

sudo /usr/sbin/fsaclctl -p / -e
and then enter your administrator password at the prompt.

Type

man chmod
to learn more about using ACL features. One caution: creating an archived file, via the Create Archive command in the Finder, strips away any ACL information contained in the file. —Ted Landau

Subscribe to the Help Desk Newsletter

Comments