• 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 / How To Sort Files By Size In Linux – List Files By Size In GB

How To Sort Files By Size In Linux – List Files By Size In GB

By Sourabh / May 27, 2024 Category: How To, Ubuntu

How to sort files by size in Linux Ubuntu. Learn how to list directories by size in Linux or list files by size in gb in Linux Ubuntu Systems.

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 that 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. This option is equivalent to ‘–block-size=human-readable’. You can also use the ‘–si’ option if you prefer powers of 1000.

List files by their size in reverse order

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

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

$ ls -lhS | head -11

Primary Sidebar

Latest Posts

How To Check User Permissions In Linux Using Command

Check Which Folder Is Taking More Space In Ubuntu Linux

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

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

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