Grep for specific files and then delete them
Posted on 2014-02-05
I have a directory full of images with two naming conventions:
- and -
I want to search the directory for all files that DO NOT have the underscore and list them in a text file for me to view and confirm. Once confirmed I want to delete all the file names on the list generated.
I assume I can grep the directory to get my output and then redirect the output to a delete command some how.
Grateful for any guidance.