[ale] Time Stamp

John Heim jheim at math.wisc.edu
Thu Aug 2 09:47:02 EDT 2007


----- Original Message ----- 
From: "Greg Freemyer" <greg.freemyer at gmail.com>
To: ale at ale.org
> In addition to 'ls', there is:
>
> date -r <filename>
>
> I like the verbose output of that sometimes, but iirc it is always
> last modification date.


HA! Interesting.  You can pass the date command a format string. So 'date 
+"%F" -r <filename' returns the last modified date in the format YYYY-MM-DD. 
Ie. 2007-08-02.

$ date +"%F" -r .bash_profile
2007-07-11
$ touch .bash_profile
$ date +"%F" -r .bash_profile
2007-08-02


Seems to me that that  could be useful in scripting somehow.




More information about the Ale mailing list