Find Largest Files and directories

 

I use these all the time, so I need a cheatsheet of it. Thanks NixCraft.

Source of information: http://www.cyberciti.biz/faq/how-do-i-find-the-largest-filesdirectories-on-a-linuxunixbsd-filesystem/

method 1 (just using find):

method 2 (du – in kilobytes):

# du -a /var | sort -n -r | head -n 10

method 4 (du – human readable):

Whats the dotglob shopt for? shopt enables or disable a shell option for the current running bash. So it specially tells the bash shell to consider hidden files and folders with *, or else * only looks at none hidden files/folders. shopt -s dotglob enables it, and shopt -u dotglob disables it (which is the default shell option).

DOTGLOB ARTICLE <- my article

method 4b (du – human readable, but dont have human-reable sort):

Article to sortby human readable, when sort cant do it because its missing -h option: MAKESHIFT HUMAN READABLE SEARCH

method3 (ducks):

 

 

Leave a Reply

Your email address will not be published. Required fields are marked *