Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!

Click here to return to the 'A script to remove .DS_Store files on any *NIX Machine' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
A script to remove .DS_Store files on any *NIX Machine
Authored by: a1291762 on Nov 30, '03 07:57:42PM

using xargs might work... but there are many cases where this will generate too many files for the rm command. There are hard limits on the length of a command string and on a large disk with many directories you'll come across this.

The correct syntax is then:
find . -name .DS_Store -exec rm "{}" ';'

The quotes are needed in case the file has a space in it. The ; can be escaped with a backslash rather than quotes but it's hard to put backslashes into this forum.

[ Reply to This | # ]