ls -l --block-size=M
( ) MiB.
MB (10 ^ 6 ), MiB (2 ^ 20 ), --block-size=MB.
, M, , - --block-size=1M. Stéphane Chazelas .
This is described on the manual page for ls; man lsand find SIZE. It also allows you to use units other than MB/MiB, and from the appearance (I also haven’t tried) of arbitrary block sizes (so you could see the file size as the number of blocks 412 bytes in size if you want to).
Note that the parameter --block-sizeis a GNU extension on top of the Open Group ls, so this may not work if you do not have a custom GNU field (which most Linux installations do). Ls from GNU coreutils 8.5 supports --block-sizeas described above.
source
share