Have ls return human readable formats (KB, MB, GB, etc) #

Like du and df, ls supports the -h switch for using unit suffixes (Byte, Kilobyte, Megabyte, Gigabyte, etc), turning this:
$ ls -l
 505223 aida16en.zip
  10273 atomicwebserver.zip
1359260 camstudio20.zip
into this:
$ ls -lh
494K aida16en.zip
 11K atomicwebserver.zip
1.3M camstudio20.zip

/nix | Nov 16, 2009


Subscribe or visit the archives.