Retrieving hidden files in TimeMachine

A few nights ago a missing > wiped out my .bash_profile file:

echo "export BASH_SILENCE_DEPRECATION_WARNING=1" > .bash_profile

This should be simple to recover from TimeMachine, except the Finder window does not display hidden (system) files.

To retrieve a file like this, open a terminal window and navigate to the locally mounted TimeMachine folder in the /Volumes directory:

[email protected]:~ $ cd /Volumes/MurrayBackup/Backups.backupdb/mbp-2019/Latest/Macintosh\ HD\ -\ Data/Users/jemurray

The files are there:

[email protected]:/Volumes/MurrayBackup/Backups.backupdb/mbp-2019/Latest/Macintosh HD - Data/Users/jemurray $ ls -al .bash_profile
lrwxr-xr-x+ 1 jemurray  staff  32 May 23 16:05 .bash_profile -> Documents/dotfiles/.bash_profile

Copy the file back:

[email protected]:/Volumes/MurrayBackup/Backups.backupdb/mbp-2019/Latest/Macintosh HD - Data/Users/jemurray $ cp .bash_profile ~

comments powered by Disqus