Pages

Friday, March 18, 2016

Find and remove all file from termilal Linux




# find . -name "*Locky*" -exec rm -rf {} \;

or

# find . -type f -name "*.Locky*" -exec rm -i {} \;

remarks : 

-name "FILE-TO-FIND" : File pattern.
-exec rm -rf {} \; : Delete all files matched by file pattern.
-type f : Only match files and do not include directory name