[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[ale] Time Stamp
- Subject: [ale] Time Stamp
- From: jheim at math.wisc.edu (John Heim)
- Date: Thu, 2 Aug 2007 08:47:02 -0500
- References: <20070726143525.HFUB19302.ibm64aec.bellsouth.net@BitlinxGroup.bitlinx.com> <[email protected]>
----- 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.