this should fix that. ls -l | sed -e :a -e 's/\s\(.*[0-9]\)\([0-9]\{3\}\) /\1,\2 /;ta'
correction: sorry it will only fix the modifications to the filename - the year is still broken.
correction: sorry it will only fix the modifications to the filename - the year is still broken.
ls -l | perl -pe 'while(s/^((\S+\s+){4})(\d+)(\d{3})([^\d].*)?$/$1$3,$4$5/){}' -rw-r--r-- 1 root wheel 16,596,907,252 24 Dec 2009 boskoop.disk0.bz2
-rw-r--r-- 1 grog wheel 4,173,914,809 20 Jul 2006 boskopp.tar.gz
With your perl one-liner on my directory I get mis-aligned columns: -rw-r--r-- 1 dalke staff 3,236,397,056 Sep 13 2011 pubchem.fps
-rw-r--r-- 1 dalke staff 712,181,172 Sep 13 2011 pubchem.fps.gz
That's ugly. It should be: -rw-r--r-- 1 dalke staff 3,236,397,056 Sep 13 2011 pubchem.fps
-rw-r--r-- 1 dalke staff 712,181,172 Sep 13 2011 pubchem.fps.gz