[Top][All Lists]

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

Re: make {} always work even outside -exec

From: James Youngman
Subject: Re: make {} always work even outside -exec
Date: Thu, 12 Oct 2006 10:18:24 +0100

On 10/11/06, Dan Jacobson <address@hidden> wrote:

Does find change any of the three stat(1) times? Not for -type f at
least I'm sure, so my line is still useful.

Only for directories which it has to read.

I was trying to find all the .debs in /var/cache/apt/archives that I
had just copied in via cpio, but hadn't yet installed.

More or less the same thing:

find /var/cache/apt -name '*.deb' -cnewer $(find
/var/cache/apt/archives -name '*.deb' -type f  -printf '%A@|%p\n' |
sort -n | tail -1 | cut -d'|' -f2-)

So what I want is -cnewerthanaccess, so there should be a more general
way to write an expression to compare any of the three stat(1) times!

Yes.  But that's six predicates.  It's probably more useful to have
functionality which allows you to do comparisons and similar things
with strings and numbers etc. that you would be able to obtain with
the -printf predicate.  Perhaps something like

-eval 'address@hidden -gt address@hidden'

It's an interesting idea, I think.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]