16 Nov
2004
16 Nov
'04
01:38
"Patrick B. O'Brien"
I need to find a word in a file then remove it. I'm doing the following, but with no luck, thanks.
'find /var/spool/mqueue/ -type f|xargs grep toulon -exec rm {} \;'
You want to delete all files that contain a word? Then I'd do rm -f $(find /var/spool/mqueue/ -type f|xargs grep -Fl toulon) If you want to remove the word from the file, see 'man sed'. Philipp