Recursively remove files


Question

Does anyone have a solution to remove those pesky ._ and .DS_Store files that one gets after moving files from a Mac to A Linux Server?

specify a start directory and let it go? like /var/www/html/ down...

1
138
4/16/2018 10:01:30 PM

change to the directory, and use:

find . -name ".DS_Store" -print0 | xargs -0 rm -rf
find . -name "._*" -print0 | xargs -0 rm -rf

Not tested, try them without the xargs first!

You could replace the period after find, with the directory, instead of changing to the directory first.

find /dir/here ...
168
1/6/2010 10:37:13 PM

Licensed under: CC-BY-SA with attribution
Not affiliated with: Stack Overflow
Icon