Last active
August 29, 2015 14:14
-
-
Save PSJoshi/388f475634a316acf09d to your computer and use it in GitHub Desktop.
Linux tips
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
How to Zip the files from given start date to end date | |
### find all files that were modified less than 29 days ago and more than 21 days ago. | |
# find . -type f -mtime -29 -mtime +21 | zip -@ my.zip | |
# tar cvf - `find . -type f -mtime -29 -mtime +21` | gzip -c 1>061110_061201.tgz | |
# find largest files | |
# du -m /some/path | sort -nr | head -n 20 | |
# find / -type f -size +20M -exec ls -lh {} \; | |
# find hard disk usage - top space consuming directories | |
# du -hcsx * | |
# du -hcsx * |sort -r|head -10 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment