Background
I use Google’s PageSpeed Insights to check if the images
on this blog are optimised. Recently, it reported that two images in
An Invalid Claim by the Government could be resized and
compressed. I did so, and then the file size of the files were
displayed using ls -lh
.
[owner@localhost ~/octopress/source/images/posts/W3CInvalid]$ ls -lh
total 312K
-rw-rw-r-- 1 owner owner 32K Apr 9 12:20 cedb1-300.png
-rw-rw-r-- 1 owner owner 132K Mar 27 14:32 cedb1.png
-rw-rw-r-- 1 owner owner 32K Apr 9 12:20 cedb2-300.png
-rw-rw-r-- 1 owner owner 83K Apr 9 12:20 cedb2.png
Problem
To remove the first four column, one uses awk
to do this. (I assume
that the current working directory is the same as above.)
$ ls -lh | awk '{print $5 $6 $7 $8 $9}'
32KApr912:20cedb1-300.png
132KMar2714:32cedb1.png
32KApr912:20cedb2-300.png
83KApr912:20cedb2.png
How can one properly align the columns?