Skip to content

Instantly share code, notes, and snippets.

@mujahidk
Created December 23, 2016 15:01
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mujahidk/a8950fac847b9dfadd38fee13020016d to your computer and use it in GitHub Desktop.
Save mujahidk/a8950fac847b9dfadd38fee13020016d to your computer and use it in GitHub Desktop.
List files using ls and size in MB (mega bytes)
# https://xkcd.com/1168/ :)
ls -l --block-size=M
@smart-albert
Copy link

smart-albert commented Apr 19, 2023

you guys may also try:

ls -lah

-h When used with the -l option, use unit suffixes: Byte, Kilobyte, Megabyte, Gigabyte, Terabyte and Petabyte in order to reduce the number of digits to four or fewer using base 2 for sizes. This option is not defined in IEEE Std 1003.1-2008 (“POSIX.1”).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment