By default, "ls" on GNU/Linux (e.g. Debian, Ubuntu, etc) only gives a short view of date and time for files and folders: When a timestamp is further in the past, the time is not displayed at all anymore. Just the month and the year.
This is absolutely insufficient for a directory listing for fixity purposes.
Gladly, the developers already provided the parameter "--time-style" to control the date/time formatting
In order to provide a standard and machine-readable timestamp output, the following options for time-style are good:
Example = 2018-07-23 11:35
Example = 2018-07-23 11:35:55.980039161 +0200
The first one, "long-iso" has minute-exact accuracy, whereas the "full-iso" shows the full time information including timezone data: "+0200"
So with the following command, your directory listing will be proper:
Example output: Have fun!
Code: Select all
$ ls -la --time-style=full-iso