• Home
  • pcDuino
  • WiKi
  • Store
  • Distributors
  • Home
  • pcDuino
  • WiKi
  • Store
  • Distributors
HomepcDuinoLinux ApplicationsHow to find the biggest files or directories on pc ...
Previous Next

How to find the biggest files or directories on pcDuino Ubuntu

Posted by: Yang , July 16, 2014

Question: I want to know which files (or directories) consume the largest disk space on my Linux. What is a command line which finds the biggest files or directories?

 

When it comes to checking which files or directories waste your disk space the most, du command is probably the easiest way.

To find the biggest files or directories on Linux, use the following command.

$ du -Sh | sort -rh | head -n 15

2010-01-01-004601_660x464_scrot

The above command will sort all files and sub-directories which exist in the current directory in the order of size (biggest size first), and print the top-15.

If you want to find the biggest files only (but not directories), use the following command instead.

$ find . -type f -exec du -Sh {} + | sort -rh | head -n 15

2010-01-01-004640_660x464_scrot

It will print the top-15 biggest files located in the current directory (and its all sub-directories).

 

Tags: Linux Applications

Share!
Tweet

Yang

About the author

Leave a Reply Cancel reply

You must be logged in to post a comment.

Category

  • Home
  • pcDuino
  • WiKi
  • Store
  • Distributors