Ever wanted to deleted (or move, copy, what else) all files in a directory? It’s quite easy: egrep -l NEEDLE * | xargs rm This command will find all files with NEEDLE in it, pipes the filename (that’s because we need the parameter L) to xargs which then use the STDIN (our filename) and put’s…
You are currently browsing all posts tagged with Bash
Find and delete files with specific content
Find and delete files with specific content - continue reading