# find everything but not html find -type f -not -name *.html # find everything in /home but not txt and remove them find /home -type f -not *php -exec rm {} ;