Michael de Silva's Blog

Software Engineer. Rubyist and Roboticist.

Michael de Silva's Blog

Software Engineer. Rubyist and Roboticist.

Recover Hidden Files and Folders with TIme Machine in Mac OS X

Having inadvertently run rm -rf ~/.foo whilst connected in via my laptop, I needed to restore that folder back via Time Machine.

Here are the steps I took to get it back,

  1. Renamed the folder as mv ~/.foo ~/_foo so that it is no longer hidden, and I can delete it manually — this was only needed as some files within this folder were being accessed by my irssi client at the time; so you may not have to do this.

  2. Run defaults write com.apple.finder AppleShowAllFiles YES and killall Finder.

  3. Run Time Machine, pick the folder you want to replace. BOOM!

  4. Run defaults write com.apple.finder AppleShowAllFiles NO and killall Finder.

Note: Notice that finder is explicitly Finder in the commands above!

Easy peasy.

comments powered by Disqus