[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: what file's mtime is the current time?

Dan Jacobson <jidanni@jidanni.org> writes:

> T> Why would you need to do that?
> I want to do
> $ test file1 -nt filenow
> to see if the mtime of file1 is in the future or not, in a simple
> shell script.


       Numeric arguments can be specified as

       +n     for greater than n,

       -n     for less than n,
       n      for exactly n.


       -mtime n
              File's data was last modified n*24 hours ago.

You do the math.


Reply to: