Wednesday, January 13, 2016

mac file directories with ._ entries

Another copy from a site with overactive editors.

http://superuser.com/questions/522149/remove-all-mac-generated-files-with-bash

Using the dot as first argument starts in the directory you are currently in.
If you want to find all files beginning with ._ you should use the slash as first parameter so that find starts at the root-directory.
And as some of these files will not be owned by you you might like to use the suso command also.
So the complete command looks like this:
sudo find / -name "._*" -exec rm -rf {} \;
At least for me that always does the trick. Ommiting the -exec part will simply list all files so you might run this first to see whether all files are found you expect

No comments:

Post a Comment