For my script, I would like to have
stat command to print time in a nice, human friendly, way:
ls calls this format
long-iso and it can be used like this:
$ ls -lA --time-style=long-iso .bashrc -rw------- 1 michael michael 5740 2015-02-04 00:48 .bashrc
However, there is no such switch for
stat. The option
%y for "human-readable time" looks like this:
$ stat -c'%A %h %U %G %s %y %n' .bashrc -rw------- 1 michael michael 5740 2015-02-04 00:48:31.160827516 +0100 .bashrc
Is there any simple way to make
stat print time in "long-iso" format?
I need to use
stat rather than
ls because I need to adjust which columns (attributes) get printed and in which order.
I am using
stat form package
8.13-3.5 on Debian.