Last active
September 16, 2016 17:59
-
-
Save abdul/c3075ca37fda1da1b479186f3d6c07f9 to your computer and use it in GitHub Desktop.
Filesystem - Unix Commands (GNU/Linux Only)
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
find . -type f -print0 | xargs -0 du -h | sort -hr | head -20 |
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
find . -mount -type f -printf "%k %p\n" | sort -rg | cut -d \ -f 2- | xargs -I {} du -sh {} | less |
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
for dir in */; do base=$(basename "$dir"); tar -czf "${base}.tar.gz" "$dir"; done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment