At work, we all use Macs, and have an SMB fileserver set up.
Somehow, weird hidden files have been popping up, particularly when syncing between our Macs and the fileserver. I don't what creates them and why they are created. For a file called index.html, a hidden file called .index.html gets created. Sometimes all the files in a folder have . equivalents, e.g. bear.jpg would also exists as a hidden file calld ._bear.jpg.
Now, these hidden files are not a problem, until you start copying folders, or do rar/zip operations, or work on a version control system. You don't want those hidden files to be cluttering up the system.
Who knows why these files are here, and possibly a command to get rid of these files from a folder recursively?
This is an example: the third file, ._index.html, was created by something, and I don't know what or why.
total 16 drwx------ 7 wolfr staff 238 Dec 9 13:34 . drwx------ 5 wolfr staff 170 Dec 9 13:17 .. -rwx------ 1 wolfr staff 4096 Dec 9 13:34 ._index.html drwx------ 14 wolfr staff 476 Dec 9 13:27 css drwx------ 6 wolfr staff 204 Dec 9 13:27 images -rwx------@ 1 wolfr staff 3520 Dec 9 13:34 index.html drwx------ 4 wolfr staff 136 Dec 9 13:27 js
This is a command I would use to delete .svn files recursively, how I modify it to remove files that match ._* recursively?
find . -type d -name '.svn' -print0 | xargs -0 rm -rdf
EDIT: the command is, I guess
find . -name '._*' -print0 | xargs -0 rm -rdf