I’m trying to figure out how to grep a folder full of files that contain 3 versions of each file. The original and several resized versions of it. I would like to delete all files with a number 0-9 or dashes in their name with grep.
Can I simply add the characters to look for instead of (filename)?
./delete -r (filename)
If you’re on Linux, you can use shell globbing to achieve this.
If this gives you the files you want, you can delete them:
Remove the
-i
if there are a lot of files.