How to restore a hidden file in Time Machine? I accidentally deleted my ~/.zshrc file and I'd like to get it back from a Time Machine backup. When I enter Time Machine I can see my home directory, but all the dot-files in the directory are hidden in the Finder window displayed by Time Machine.

How can I restore a hidden file like ~/.zshrc using Time Machine?
Rest assured that Time Machine is backing up your dot-files! You just can't see them by default in Finder. In order to restore a hidden file like .zshrc you first need to turn off file hiding in finder. You can do this by opening a Terminal window and entering:

defaults write com.apple.finder AppleShowAllFiles TRUE
killall Finder


Now enter Time Machine and navigate to where your hidden files resided. You should be able to restore them from there.

When you've restored all the files you want you can go back to having Finder hide them by entering:

defaults write com.apple.finder AppleShowAllFiles FALSE
killall Finder


in a Terminal window.