Skip to content

Instantly share code, notes, and snippets.

@abdul
Last active September 16, 2016 17:59
Show Gist options
  • Save abdul/c3075ca37fda1da1b479186f3d6c07f9 to your computer and use it in GitHub Desktop.
Save abdul/c3075ca37fda1da1b479186f3d6c07f9 to your computer and use it in GitHub Desktop.
Filesystem - Unix Commands (GNU/Linux Only)
find . -type f -print0 | xargs -0 du -h | sort -hr | head -20
find . -mount -type f -printf "%k %p\n" | sort -rg | cut -d \ -f 2- | xargs -I {} du -sh {} | less
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