On Wed, Nov 06, 2002 at 11:24:19AM -0600, Matthew Bettinger wrote:
> I am having a bit of trouble with the find command.  I am a novice in its use 
> so maybe someone can help  me out here. 
> 
> I have a list of files (hundreds) in directory . and need to search through 
> and delete every file that contains the word foo.
> 

try

  find . -name "*foo*" -print0 | xargs -0 rm

the -print0/-0 handles the filenames as null-terminated strings,
so filenames with spaces, etc. are handled correctly.

- rob

--
Rob Ellis <[EMAIL PROTECTED]>
System Administrator, Web Networks

To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-questions" in the body of the message

Reply via email to