Tuesday 27 October 2009

Search files for text and delete

I had to do this when a mail queue ended up with hundreds of bounce messages. I needed to delete these messages and keep the rest.

rm `fgrep -lir searchstring *`

No comments: