• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
Source Digit

Source Digit

Linux, Ubuntu Tutorials & News, Technology, Gadgets & Gizmos

  • Home
  • How To
  • Ubuntu
  • Instagram
  • Blogging
  • Android
  • WordPress
  • +More
    • Cloud Computing
    • Gadgets
    • Social Media
    • Technology
  • Write for Us
Home / How To / Check Which Folder Is Taking More Space In Ubuntu Linux

Check Which Folder Is Taking More Space In Ubuntu Linux

By Sourabh / August 17, 2026 Category: How To, Ubuntu

How to check which folder is taking more space on Ubuntu. On Linux, check disk space by folder in command line terminal.

The best solution is to run the following command to get a sorted list of the biggest folders in the current directory, right from your terminal.

sudo du -h --max-depth=1 | sort -rh

Alternatively, you can also run the following command to see the top 10 space consuming folders across the whole system (including the root directory):

sudo du -hsx /* | sort -rh | head -n 10

How To Find And Sort Files By Size In Linux

You can use one of the following commands to find and sort files by size in Linux Ubuntu:

$ ls -lhS
$ ls -l
$ ls -lS
$ ls -lhS

NOTE: The command option ‘-h’ or ‘–human-readable’ is used to get the result in human readable format. It is used to append a size letter to each size, such as ‘M’ for mebibytes. Powers of 1024 are used, not 1000; ‘M’ stands for 1,048,576 bytes.

Sort Files By Size In Recursive Order In Linux

If you want to display the result in ascending order and show bigger files at the bottom and smaller files at the top, you can use the command option -r with the ls -lhSr command.

ls -lhSr

Get The 10 Biggest Files In A Directory

If you want to get the list of 10 biggest files in a directory, you can use the following command:

ls -lhS | head -11

Note that in the command above the number 11 is used instead of 10. It is so because the first line shows the total number of blocks used in the directory and the rest 10 are used to show the 10 biggest files in a directory.

Similarly if you want to include hidden files while sorting files by size, you can use “ls -lahS” command where the option -a shows the hidden files including the special . and .. directories.

Primary Sidebar

Latest Posts

How to Install Claude Desktop App in Ubuntu Linux

Job Scheduling Using At Command In Linux With Examples

How To Check Permissions Of A Directory In Linux Command

Delete Directory And Contents Recursively Without Prompt On Linux

Check User Login History In Ubuntu Linux Command Line

Use Locate Command To Find File In Linux Terminal By Name

How To Change Terminal Color In Ubuntu Command Line

How To Run Fsck Manually In Linux To Fix Unexpected Inconsistency

How To Fix Broken Packages On Ubuntu From Terminal

Re Execute The Previous Command In Linux Ubuntu Command Line

© 2026 Source Digit • Linux, Ubuntu Tutorials & News, Technology, Gadgets & Gizmos

  • Home
  • About
  • Privacy Policy
  • Terms & Conditions
  • Contact Us
  • Sitemap