Linux bash find files with find and remove them with rm

05:15 PM by Christian Koch

Filed under Commands

Last modified Sunday September 23rd, 2012

To find and remove files with the find and rm comand use the following line:

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

Use this with cautiousness, to prevent deleting the wrong files use the following comand to view the files that find finds:

find . -type f -name "file*"


Related Articles

                                                          Leave a Comment