Find and delete

Find and remove multiple files

$ find . -type f -name "\*.mp3" -exec rm -f {} \;

Find and remove single file

$ find . -type f -name "tecmint.txt" -exec rm -f {} \;

Find and delete 100mb files

$ find / -type f -size +100m -exec rm -f {} \;

Find specific files and delete

$ find / -type f -name \*.mp3 -size +10m -exec rm {} \;
Comments