October 27, 2015

Finding Lost Files after System Upgrade


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:


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.


Add your Comments

Feel free to leave a comment about this post.

- Feel Free to add HTML to your comment!