Two little python scripts that print the ages of files in seconds
) or days (
- Copy to
~/bin or somewere else in your path
- Make sure they are executable
age <file> or
days <file> or for
any file you want to know when it has been modified.
The scripts also work when you pass several files to them
age script prints just
seconds. The numbers quite soon get rather large, and it becomes
hard to parse the output for files more than a few ten thousand
days prints the age with great precision. It does not
use hours, minutes and seconds as subunit of the day, but uses
decimal fractions. These are separated with apostrophs to increase
readability. For long time spans the age is shown in years, too.