48 lines · 1.1 KB · Text
RawDownload
.TH SECONDS 1 .SH NAMEseconds \- convert human-readable date (and time) to seconds since epoch.SH SYNOPSIS.B seconds.I date\&....SH DESCRIPTION.I Secondsprints the number of seconds since 1 Jan 1970corresponding to one or more human-readable.IR date s.Each.I datemust be.I oneargument;it will usually be necessary to enclose it in quotes..PP.I Secondsaccepts a somewhat wider range of input than just output from.IR date (1).The main requirement is that the date must be fully specified,with a day of month, month and yearin any order.The month must be an English name (or abbreviation),not a number, and the year must contain 4 digits.Unambiguous time-zone names are understood (i.e., not.LR IST )or time zones may be written as.IR ±hhmm .Case is ignored..SH EXAMPLESPrint the names of all files under.L \&.modified since the start of 23 May 2011..IP.EXdu -ta | awk '$1 >= '^`{seconds '23 may 2011'}^' {print $2}'.EE.SH SEE ALSO.IR date (1),.IR du (1),.IR mtime (1),.IR ctime (2).SH BUGSAll-numeric dates, popular in the USA, are simply ambiguous,more so if the year is truncated to 2 digits.