Created
July 29, 2021 02:41
-
-
Save hlorand/67e156d91dda012afebef02316fe19a7 to your computer and use it in GitHub Desktop.
Biggest files and folders in bash
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
| # The 500 biggest folders except Google Drive, Trash etc... | |
| sudo du -hx / 2>/dev/null | sort -rh | grep -v "Google Drive" | grep -v "REPOS" | grep -v "Fotókönyvtár" | grep -v ".Trash" | grep -v "CameraUploads" | head -500 | |
| # The 500 biggest file that is older than 1 year | |
| sudo find / -type f -mtime +365 -exec ls -laT {} \; 2>/dev/null | awk '{print $5,$9,$10}' | sort -rh | head -500 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment