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

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

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

javascript - storing input from prompt in array and displaying the array -