Share icon

Usually we all use "rm" command to delete or remove the files and folder on linux, but if we want to delete the specific type of content/files then we can use "find" command to find and "delete" command to delete;

find . -name "*.zip" -type f -delete

or enter path of directory

find /path/to/dir -name "*.zip" -type f -delete

if you to get list of all items of specfic extension you can do like this before delete -

find . -name "*.zip" -type f 


ls -la *zip

Add new comment

Restricted HTML