I can\'t seem to find how to print out the date of a file. I\'m so far able to print out all the files in a directory, but I need to print out the dates with it.
I
You can use:
ls -lrt filename |awk '{print "%02d",$7}'
This will display the date in 2 digits.
If between 1 to 9 it adds "0" prefix to it and converts to 01 - 09.
Hope this meets the expectation.