How to Empty Directory With Large Number of Files

The easiest and the fastest way to empty directories with a large number of files is with the following command. Add this command in my public technical diary for future reference. 

Go to the directory which contains a large number of files.  For example, files name are like sip_20201002145227__410060544193744.log .

find . -name "sip_2020*" -delete

Enjoy ;)

No comments:

Post a Comment

How to resize any VMs Hard disk size

Pre-Requiste First Confirm if your Linux machine was created using LVM or not, execute the following commands pvdisplay vgdisplay lvdisplay ...