<<Back to Linux Main Page
How to Delete file older than 10 days
$find /u01/log/ -type f -mtime +10 -exec rm -f {} \;
Deleting files older than 10 Hours
$find /u01/log/ -type f -mmin +600 -exec rm -f {} \;
Listing top 10 files by size
$du -a /u01/log/ | sort -n -r | head -n 10
Counting files older than 1 days
$find /u01/log/ -type f -mtime +1 |wc -l
Comments
Post a Comment