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
Post a Comment