Human-readable ls output under AIX?
You can use du. It does not have -h option, but it has -k -m and -g:
$ du -m /tmp/*
4.84 /tmp/diagSEgenSnap
33.12 /tmp/fwupdate
$ du -k /tmp/*
4952 /tmp/diagSEgenSnap
33920 /tmp/fwupdate
Might I suggest ls -ls
?
That will provide the files sizes in KB instead of the default blocks.
Ex:
36 -rw-r--r-- 1 oracle dba 33875 Feb 2 2011 step2.log
32 -rw-r--r-- 1 oracle dba 30308 Feb 2 2011 step2.sql
Try this
ls -l | awk '{$5=sprintf("%.9f GB", $5/1024^3)} 1'