Show ls File Sizes with Commas

This page answers questions like these:

Show ls File Sizes with Commas – Modern Solution:

$ ls -l --block-size=\'1
OR

$ LC_NUMERIC=en_US.UTF-8 ls -l --block-size=\'1

Show ls File Sizes with Commas – Old-Fashioned Solution:

ls -l | sed -e 's/\( [0-9 ][0-9 ][0-9] [JFMASOND][aepuco][bcgrlnptvy] \)/ \1/' \ -e 's/\([0-9]\)\([0-9][0-9][0-9] [JFMASOND][aepuco][bcgrlnptvy] \)/\1,\2/' \ -e 's/\( [0-9 ][0-9 ][0-9 ][ ,][0-9 ][0-9 ][0-9] [JFMASOND][aepuco][bcgrlnptvy] \)/ \1/' \ -e 's/\([0-9]\)\([0-9][0-9][0-9],[0-9][0-9][0-9] [JFMASOND][aepuco][bcgrlnptvy] \)/\1,\2/' \ -e 's/\( [0-9 ][0-9 ][0-9 ][ ,][0-9 ][0-9 ][0-9 ][ ,][0-9 ][0-9 ][0-9] [JFMASOND][aepuco][bcgrlnptvy] \)/ \1/' \ -e 's/\([0-9]\)\([0-9][0-9][0-9],[0-9][0-9][0-9],[0-9][0-9][0-9] [JFMASOND][aepuco][bcgrlnptvy] \)/\1,\2/' \ -e 's/ \([^ ]*[0-9] [JFMASOND][aepuco][bcgrlnptvy] \)/\1/' |



Related Links:
File Size in Bytes using a Shell Command
Count Occurrences of a Hexadecimal Sequence in a File
Count Occurrences of a String in a File
Find Positions of a Hexadecimal Sequence in a File
Join Lines of Text File Together
Output Lines of a File in Reverse Order
Output the Lines Between Two Matching Lines

Home  >  Linux / Unix  >  Show ls File Sizes with Commas


Tags: ls with commas, file size with commas, filesize with commas, file size commas, filesize commas, ls filesize commas, ls file size commas, ls -l, thousands separato, linux, unix, solaris, bsd, aix

Src: file-size-with-commas-in-ls.txt
Dst: Linux-Unix/ls-file-size-with-commas.htm
Ads: 3