Under Linux, you can delete files of a specific file type located in a folder and its sub-folders using the simple combination of the find and rm commands.
For example, if file types like .inf need to be deleted from all folders, we can execute the following command:
#find /path/to/the/folder/ -type f -iname "*.inf" -exec rm -vf {} \;
Or, if we want to remove files one be one, then we can use:
#find /path/to/the/folder/ -type f -iname "*.inf" -exec rm -iv {} \;
No comments:
Post a Comment