Hello fellows,

I'm on Mac OS X and have the following problem:

Using a common cleanup script I got rid of useless localizations, keeping all the english files:

find /Applications ~/Applications /Library ~/Library \( -iname '*.lproj' -and \! \( -iname 'en*' \) -and \! \( -path '/Library/Receipts/*' -or -path '~/Library/Receipts/*' \) \) -print0 | xargs -0 rm -frv {}

Unfortunately I forgot to also filter out all german files, which would have looked like this:

find /Applications ~/Applications /Library ~/Library \( -iname '*.lproj' -and \! \( -iname 'en*' -or -iname 'de*' -or -iname 'ger*' \) -and \! \( -path '/Library/Receipts/*' -or -path '~/Library/Receipts/*' \) \) -print0 | xargs -0 rm -frv {}

Since I happen to have a full backup of my system, I would be able to restore all removed german language files to their respective locations...

How could I achieve this??

I would perform the above search for the (still existing) english files...

find /Applications ~/Applications /Library ~/Library \( -iname '*.lproj' -and \! \( -iname 'en*' \) -and \! \( -path '/Library/Receipts/*' -or -path '~/Library/Receipts/*' \) \)

... which gives me the path for every file, like "/Applications/Foo.app/Contents/Resources/English.lproj"

And then I would need to go to "/Volumes/Backup" + the above path without the filename, look for "de.lproj" and "German.lproj" and copy whatever result to the original location...

Any ideas how this second part of the script would look like? I have no clue and I really don't want to restore hundreds of files manually...

Thanks in advance!

What sort of backup did you do (ufsdump, netbackup, etc). You should just be able to restore based on a standard base directory and wildcards, like the find you did to get all the German files.

If you let me know what you're using to backup/restore, I may be able to help you out with a specific course of action.

Best wishes,

Mike

This article has been dead for over six months. Start a new discussion instead.