Recursively delete files not containing a specified string in the filename October 5, 2015 by user find . ! -name '*gz' -type f -delete This deletes all files that do not contain ‘gz’ in its filename