Skip to content

Instantly share code, notes, and snippets.

@jalex19100
Last active November 11, 2015 22:44
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jalex19100/610da4c42ed65b85ef2b to your computer and use it in GitHub Desktop.
Save jalex19100/610da4c42ed65b85ef2b to your computer and use it in GitHub Desktop.
UNIX magic
# show any ghost/phantom resources that could still be affecting df but have been deleted
lsof +L 1 /home | grep -i deleted
# hog
du -sk *
# add up the hogs
du -sk * |sort -n| awk {'print $1'}| paste -sd+| bc
# use date to get the date 30 days ago
date +%F -d "now - 30 days"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment