Extract the size of a file from a bash script

May 26, 2018
linux stat bash

There was a time I used to analyse the results of an ‘ls’ command to extract the size of a file.

Here is a better way, using the stat command -

stat --format "%s" my_filename_here

Sorting a list in lexographic order using bash

May 26, 2018
bash linux sort

Setting the timezone on AWS Linux AMI from command line

May 7, 2018
aws linux timezone

Setting the hostname on AWS Linux AMI from command line

May 6, 2018
aws hostname linux