Time Machine vs. hidden files

Apple – Downloads – Dashboard Widgets – hiddenfiles:

Simple widget that toggles visibility of files that are hidden from the Finder.

I am using Time Machine (an experiment) to do backups. I had a perfect opportunity to test it.

In an effort to tweak my Apache2 MPM settings (need to build it differently) I wound up screwing up a change I had made to /opt/local/apache2/conf/extra/httpd-userdir.conf (I should have used a different file rather than modifying the distribution file). Oops.

But wait! Time Machine should have that file from 2 hours ago. It was good then. Let’s go look. Oops. I can’t see the /opt directory. Hmmm. If I change the Finder to show hidden files will I see it? Run Cocktail, change the preference, restart the Finder. Yes! There’s the file. I can restore it. Now put back the Finder settings…what a pain.

I could write a script I guess.

Nope – I’ll just use the neat, little widget listed above. F12, click, wait one second, enter the Time Machine, do the restore, F12, click, done.

I wonder if Time Machine has a preference for showing hidden files separate from the Finder setting?

An alternative for people who have FastScripts or FastScripts Lite is to simply create 2 shell scripts –

Hide files

#!/bin/bash
# Hide files in Finder

defaults write com.apple.finder AppleShowAllFiles -bool FALSE
killall Finder

Show files

#!/bin/bash
# Show files in Finder

defaults write com.apple.finder AppleShowAllFiles -bool TRUE
killall Finder

Put them in /Users/yournamehere/Library/Scripts with appropriate names. Then you can select the “show files” script, fire off Time Machine, and set them back when done.

I keep forgetting that FastScripts lets me do shell scripts – thanks Daniel – oh, yeah, he does MarsEdit too.

Advertisements