[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: -daystart -mmin
From: |
Andreas Metzler |
Subject: |
Re: -daystart -mmin |
Date: |
Mon, 12 Jul 2004 09:03:13 +0200 |
User-agent: |
Mutt/1.5.6+20040523i |
On 2004-07-11 Dan Jacobson <address@hidden> wrote:
> $ man find
> -daystart
> Measure times (for -amin, -atime, -cmin, -ctime,
> -mmin, and -mtime) from the beginning of today rather
> than from 24 hours ago.
> Maybe you mean "24 hour increments measured from now" instead of
> "ago",
No.
> and also are you sure they apply to -mmin, etc.?
Yes.
The documentation is not right, but you are wrong, too. ;-) -daystart
does not measure from the "beginning of today" but from the "beginning
of tomorrow" or the "end of today" respectively.
It is to test. Generate a file with current timestamp (touch foo) and
test. "find -mmin -60 -type f" will find it, but "find -daystart
-mmin -60 -type f" will not (unless your local time is between 23:00
and 00:00 hours).
The same applies to -mtime. - Generate dummy files in 10-hour
intervals (for i in `seq -w 1 5 51` ; do touch --date="$i hours ago"
$i ; done) and test. "find -daystart -mtime -1" will list all files
generated today, i.e. much less than "find -mtime -1" which would list
anything generated in the latr 24 hours.
cu andreas
--
"See, I told you they'd listen to Reason," [SPOILER] Svfurlr fnlf,
fuhggvat qbja gur juveyvat tha.
Neal Stephenson in "Snow Crash"
- -daystart -mmin, Dan Jacobson, 2004/07/11
- Re: -daystart -mmin,
Andreas Metzler <=