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
Post a Comment