AMP AMP
AMP
0
AMP

Recursively removing multiple files with extension using find command

the current working directory contains various files. whereas i need to remove only the files with .cache extension... Can i able to do this using find command.....???

find command Add a comment
a sample image
ryan
asked Feb 06 2017

Answer

AMP
0
AMP

You can use the below command to remove .cache files....

# find . -name "*.cache" -exec rm -f {} \;

Here, dot is to represent the current working directory, -name will check for the exact name called .cache and -exec will execute the rm -f command i.e., it will delete the respective files.

Add a comment
a sample image
jagannatharumugam
asked Feb 06 2017
edited Oct 05 2018
Post your Answer