Command to find all log files that are older than two days
Command to find and delete all log files that are older than two days
Command to find files with size more than 50 MB
- find –name '*.log' –mtime +2 -exec ls –l {} \;
Command to find and delete all log files that are older than two days
- find -name '*.log' -mtime +2 -exec rm {} \;
Command to find files with size more than 50 MB
- find . -type f -size +50000k -exec ls -lh {} \; | awk '{ print $9 ": " $5 }'
Command to display dir structure with size in GB
- du -h ./ | grep ^[0-9.]*G
No comments:
Post a Comment