Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 26 Jul 2004 13:08:14 +0300
From:      Ruslan Ermilov <ru@freebsd.org>
To:        Alfred Perlstein <alfred@freebsd.org>
Cc:        hackers@freebsd.org
Subject:   Re: RFC: "-exit" option for find(1)
Message-ID:  <20040726100814.GF76937@ip.net.ua>
In-Reply-To: <20040716072341.GX95729@elvis.mu.org>
References:  <20040716071545.GW95729@elvis.mu.org> <20040716072341.GX95729@elvis.mu.org>

next in thread | previous in thread | raw e-mail | index | archive | help

[-- Attachment #1 --]
On Fri, Jul 16, 2004 at 12:23:41AM -0700, Alfred Perlstein wrote:
> I'm up too late, this doesn't work because find returns
> success whenever it successfully runs thought everything.
> 
> Perhaps the primary change to just "-exit" which would
> make find exit successfully, and if the primary is never
> encountered (ie. our find logic never hits it) find would
> exit with a non-zero exit status?
> 
> Ideas?  Better ideas?
> 
> The reason I want this is to avoid extracting a tarball
> over a directory that has files in it that are newer than
> the tarball.
> 
> Neither tar nor find seem to make this easy...
> 
[ `find . -type f -newer ../src.tar.gz |head -1 |wc -l` -eq 0 ] && echo hi


Cheers,
-- 
Ruslan Ermilov
ru@FreeBSD.org
FreeBSD committer

[-- Attachment #2 --]
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (FreeBSD)

iD8DBQFBBNgOqRfpzJluFF4RAhaLAJ4uHgRsn1EvadzuUZ29DXmuGfU4tQCglNDt
8cQPL70vRbzGcH44aDhH6So=
=WoBq
-----END PGP SIGNATURE-----

Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20040726100814.GF76937>