list - How to delete selected files from the command line -


i have shell command run scan server , list files name temp_file_14 in /home directory tree follows:

find /home . -name "temp_file_14" -exec ls -lh {} \; 

i change command have physically delete "found" files instead of listing them. can me command should perform delete task instead of list task?

thanks.

this should work:

find . -name "temp_file_14" -exec rm -rf {} \; 

or one:

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

Comments

Popular posts from this blog

javascript - jQuery: Add class depending on URL in the best way -

caching - How to check if a url path exists in the service worker cache -

Redirect to a HTTPS version using .htaccess -