NetBSD-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

How to use the 'ls' -M flag?



I'm having no success trying to get ls to print file sizes, using the -M flag.


     -M    Modifies the -l and -s options, causing the sizes or block counts
             reported to be separated with commas (or a locale appropriate
             separator) resulting in a more readable output.  Overrides -h;
             does not override -k.


 $ ls -lM *.c
-rw-r--r--  1 root  wheel    5535 Aug  7  2003 cmp.c
-rw-r--r--  1 root  wheel   18251 May 26 21:21 ls.c
-rw-r--r--  1 root  wheel    1839 Sep  5  2016 main.c
-rw-r--r--  1 root  wheel   13806 May 26 21:52 print.c
-rw-r--r--  1 root  wheel    5090 Aug 29  2011 util.c


I would expect to see something like this:

-rw-r--r--  1 root  wheel    5,535 Aug  7  2003 cmp.c
-rw-r--r--  1 root  wheel   18,251 May 26 21:21 ls.c


etc.

Thanks for any hints.

-Mike



Home | Main Index | Thread Index | Old Index