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,
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.Run
defaults write com.apple.finder AppleShowAllFiles YES
andkillall Finder
.Run Time Machine, pick the folder you want to replace. BOOM!
Run
defaults write com.apple.finder AppleShowAllFiles NO
andkillall Finder
.
Note: Notice that finder is explicitly Finder
in the commands above!
Easy peasy.