find /tmp -name core -type f -print | xargs /bin/rm -f
To avoid nasty surprises, change that to:
find /tmp -name core -type f -print0 | xargs -0 /bin/rm -f
This way, find uses a null char instead of a line feed to seperate filenames, and xargs expects a null char instead of any whitespace between filenames. As the null char is the only char that can not be part of a filename, this is the only way to reliably separate filenames.
Alexander
--
Today I will gladly share my knowledge and experience, for there are no sweeter words than "I told you so". ;-)
|