Format file size in Unix in readable format -


when ls -l

-rw-r--r--   1 jboss    admin  **26644936** sep  1 21:23 mybig.war 

how print below

-rw-r--r--   1 jboss    admin  **26,644,936** sep  1 21:23 mybig.war 

the proper way format ls output specify block_size.

saying:

block_size="'1" ls -l 

would achieve desired result.

quoting above link:

some gnu programs (at least df, du, , ls) display sizes in “blocks”. can adjust block size , method of display make sizes easier read.


a block size specification preceded ‘'’ causes output sizes displayed thousands separators.


Comments

Popular posts from this blog

How to remove text and logo OR add Overflow on Android ActionBar using AppCompat on API 8? -

html - How to style widget with post count different than without post count -

url rewriting - How to redirect a http POST with urlrewritefilter -