![]() ![]() I hope this article will help you to find out the top space consuming directories and files on Linux & UNIX system. If you have any queries and problem please comment in comment section. # find /var//var//var/www/web3/web/chat/images/crm/infu8.jpg ![]() # find /var/www/web3/web/chat/ -type f -printf '%s %p\n'| sort -nr | head -10ġ63989 /var/www/web3/web/chat/images/integrations/BrandonHallGrp.png You can also skip the directories and only show files, follow the below command. # find /var//var//var//var//var/Skip the directories and only show files clientmqueue Find top 10 space consuming files in a dirctory and its subdirectoriesįollow the below GNU/find command. # for i in G M K do du -ah | grep $i | sort -nr -k 1 done | head -n 11Ĥ.0K. For other UNIX systems should use the below command. You can use above command only if GNU/sort is installed. head -n10 : Display the first 10 lines.sort -h : Compare human readable numbers.sort -r : Reverse the result of comparisons.du -x : Skip directoried on different file system.du -h : Display sizes in human readable format.OR, If you want output in human readable format follow the below command. ![]() # du -a /var/spool/ | sort -n -r | head -n 10 Suggested Read: Top 25 Linux Find Command Examples Find Top 10 Space Consuming Directories and FilesĮxecute the below command at the shell prompt to find out top largest Files and Directories. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |