August 22, 201214 yr Hi all, Can anyone help with writing a regex command i can run (if its even possible). Basically, I need a script that will look through all image directories to check if there are any files that are NOT .jpg, .jpeg, .gif, .png or .bmp At the moment, I run a script via cron to specifically check for .php files in image folders, but think I need something that does the above now. Really appreciate any help! Thanks, Paul
August 22, 201214 yr Although not the cleanest command, this should work: find /directory/images/ -not -iname "*.jpg" -not -iname "*.jpeg" -not -iname "*.gif" -not -iname "*.png" -not -iname "*.bmp"
Create an account or sign in to comment