October 27, 2015

Finding Lost Files after System Upgrade

osxelcapitan

I recently upgraded to El Capitan and notice that all of the dictionary files that I put in /usr/shar/dict were removed. In panic mode, I was scrambling around trying to see if I had copies of the files. I could find a few of the dictionary files but not all of them.

Then I remember that using Spotlight search tool only search for some of the files. A better search, especially Unix files is to use the UNIX find command tool. As the search will be more broad.

Using Terminal application, I searched for one of the files:

find / -name Huck.txt -print

Initially I was disappointed because I just saw a lot of directories that I didnít have access to. Then, while scanning the listing, I saw this item:

/Library/SystemMigration/History/Migration-A501F82A-4DC8-4EBB-BB72-9AB0C9490E82/QuarantineRoot/usr/share/dict/Huck.txt

Bingo! Apple actually made a backup copy of the files before removing them! Note: they didnít move any of the installed system files in that directory such as /usr/share/dict/words and /usr/share/dict/words2

I immediately changed the directory to:

cd /Library/SystemMigration/History/Migration-A501F82A-4DC8-4EBB-BB72-9AB0C9490E82/QuarantineRoot/usr/share/

Then I open the directory in Finder:

open .

Then I copied the /dict folder to the desktop.

Crisis averted! So this doesnít happen again, I am going to keep the contents of the folder in my Dropbox. That way I know Iíll have a copy on any computer that I have and I wonít have to worry about losing the file during the next update.

Comments

Add your Comments

Feel free to leave a comment about this post.

- Feel Free to add HTML to your comment!