On 04-May-2001 Stan Brown wrote: > I know thta it's possible to sue the GNU version of date, as provided with > Debian to return a dat, say 30 minutes in the past. > > However I can't seem to get the syntax quie correct. From the man page, > it's apparent that I need the --date option, but what is the "STRING" > fomrat? >
as much as I hate it, the info page has much more detailed info and examples. Basically, any of the output formats can also be input formats. $ date --date='9:20pm' Fri May 4 21:20:00 PDT 2001 $ date --date='30 min ago' Fri May 4 08:52:49 PDT 2001 $ date --date='yesterday' Thu May 3 09:23:13 PDT 2001 $ date --date='2 years ago' Tue May 4 09:24:07 PDT 1999 etc. P.S. if the gnu info browser gives you the heebie jeebies, try using pinfo -- works like lynx.