• Skip to main content
  • Skip to secondary menu
  • Skip to primary sidebar
  • Skip to footer
WebSetNet

WebSetNet

Technology News

  • Technology News
    • Mobile
    • Games
  • Internet Marketing
  • System Admin
    • Windows 11
    • Linux
    • Mac & Apple
    • Website Scripts
      • Wordpress

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

November 25, 2022 by billy16

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

Original Article

Twitter Facebook Pinterest Linkedin WhatsApp

Related posts:

  1. 31 Linux Commands Every Ubuntu User Should Know
  2. How to Find the PID of a Linux Process With pidof or pgrep
  3. Ubuntu 17.04 "Zesty Zapus" All Flavors Download Links
  4. How to Flush DNS in Linux
  5. Amazon Alexa Easter eggs: Over 180 funny things to ask Alexa
  6. Essential command tools to fix virtually any networking issue on Windows 10
  7. 50 Best Ubuntu Apps You Should Be Using Right Now
  8. 20+ Free Books To Learn Linux For Free
  9. Things to do After Installing Ubuntu 18.04
  10. 20+ Free eBooks To Learn Linux For Free

Filed Under: Linux Tagged With: files, linux, list, size, sort

Primary Sidebar

Trending

  • How To Extract & Install tar.gz Files In Ubuntu
  • 8 Best Sites to Read Manga Online for Free
  • Exclamation Mark on Network Signal, Mobile Data Not Working? 8 Ways to Fix
  • 3 Ways to Disable GetApps on Xiaomi, Redmi, and Poco Phones Running MIUI
  • How to Track a Stolen or Lost Nintendo Switch
  • How Much Data is Consumed by Zoom, Google Meet, Skype, Microsoft Teams, Slack and Hangouts?
  • 7 Ways to Save an Image From Google Docs
  • How to lock Shape, Image or Objects in Microsoft PowerPoint
  • Samsung TV model numbers explained 2022: What you need to know about Samsung’s OLED, Mini LED, QLED and LCD televisions
  • How To Fix No Sound On YouTube
  • AirPods Pro 2: All controls and gestures, explained
  • How To Install Android App APK on Samsung Tizen OS Device
  • Android Developer Options Explained: Here’s everything you can do with these settings
  • How to Boot a Mac in Safe Mode
  • Fix Windows Update Error 0x800f020b
  • 192.168.1.1 Login, Admin Page, Username, Password | Wireless Router Settings
  • How To Enable Or Disable Snipping Tool In Windows 10
  • How to Find Hidden & Saved Passwords in Windows

Footer

Tags

Amazon android Apple Asus available download: edge feature features first free from galaxy Game games gaming gets google install Intel iPhone launches linux Microsoft more OnePlus phone release released review: samsung series support this Ubuntu update using video watch what will windows with xbox your

Archives

  • November 2023
  • September 2023
  • August 2023
  • July 2023
  • June 2023
  • May 2023
  • April 2023
  • March 2023
  • February 2023
  • January 2023
  • December 2022
  • November 2022
  • October 2022
  • September 2022
  • August 2022
  • July 2022
  • June 2022
  • May 2022
  • April 2022
  • March 2022
  • February 2022
  • January 2022
  • September 2021
  • August 2021
  • July 2021
  • June 2021
  • May 2021
  • April 2021
  • March 2021
  • February 2021
  • January 2021
  • December 2020
  • November 2020
  • October 2020
  • September 2020
  • August 2020
  • July 2020

Meta

  • Log in
  • Entries feed
  • Comments feed
  • WordPress.org