tech-userlevel archive

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

Re: Possible enhancement to find(1)



On Fri, 10 Jun 2016, Robert Elz wrote:

   Date:        Fri, 10 Jun 2016 17:03:35 +0800 (PHT)
   From:        Paul Goyette <paul%whooppee.com@localhost>
   Message-ID:  <Pine.NEB.4.64.1606101701560.1765%pokey.whooppee.com@localhost>

 | Does anyone have suggestions and web-sites for a couple of linux
 | distros?  I'm not going to check them all...  :)

I'd assume they all use the find that's in the gnu findutils which is
in pkgsrc (sysutils/findutils)

But from a man page on a real linux system...

    -newerXY reference

Yeah, I noticed this, too, on findutils...

This is ugly.

If you want the linux variation, go install findutils from pkgsrc.  :)

I'm willing to add the -{a,c,m}since options (or -{a,c,}since) with parsing of the timestamp via parsedate(3), but I'm not going to copy findutils.


The -d option of gnu date is essentially the same as in NetBSD date -d
(though I wouldn't guarantee that our parsedate() always produces the
same results as theirs - in fact it almost certainly doesn't).

I insist on using parsedate(3) since I want these to work:

	find .... -asince "3 days ago"
	find .... \! -since "last monday"


Note that that man page extract is useless, and leaves you guessing (which
is what I did) as to what this thing actually means!  The text suggests that
both X and Y relate to the reference time, but that would make no sense at
all.   I deduce that X is the inode time to check in the current file, and
Y is the reference time, as X==t is invalid.

It's the only interpretation that comes close to making sense.


Anyway, I don't really care one way or the other. I'll make my changes locally, and I'll get what I want. If others want to use findutils, they know where to get it; if others want my changes, ask for them.

I just won't commit them without some sort of indication of consent. (Just like my changes re resurrecting the ksem module, discussed last year...)



+------------------+--------------------------+------------------------+
| Paul Goyette     | PGP Key fingerprint:     | E-mail addresses:      |
| (Retired)        | FA29 0E3B 35AF E8AE 6651 | paul at whooppee.com   |
| Kernel Developer | 0786 F758 55DE 53BA 7731 | pgoyette at netbsd.org |
+------------------+--------------------------+------------------------+


Home | Main Index | Thread Index | Old Index