How to find and delete older files with bigger size files in Linux

To find out files size more than 5MB

#find . -size +5000  -exec ls -ltr {} \; 

 To **Remove** files size more than 5MB

#find . -size +5000k  -exec rm -rf {} \;

To find out files older than 30days

#find . -mtime +30 -exec ls -ltr {} \;

To find **Remove** files older than 30days

#find . -mtime +30  -exec rm -rf {} \; &


                                  Linux Server Performance Analyzer Tools

No comments:

Post a Comment