RFC: "-exit" option for find(1)
Ruslan Ermilov
ru at freebsd.org
Mon Jul 26 03:08:24 PDT 2004
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 at FreeBSD.org
FreeBSD committer
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 187 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-hackers/attachments/20040726/da19abf9/attachment.bin
More information about the freebsd-hackers
mailing list