[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Unix command(s) to remove files recursively?

On 05/06/12 13:12, Slavko wrote:

very bad idea, if the file name has spaces…


find . -name '*~' -print0 | xargs -0 rm

replace the '.' by your paths..., you can add the '-f' option to rm, to
avoid error messages, if something will be wrong (directory with name '*~'
and '*~' files in it)

or you could just use the -delete option in find.  Much simpler.

Chris Bannister

Reply to: