From owner-freebsd-bugs Thu Aug 6 09:59:00 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id JAA07437 for freebsd-bugs-outgoing; Thu, 6 Aug 1998 09:59:00 -0700 (PDT) (envelope-from owner-freebsd-bugs@FreeBSD.ORG) Received: from austin.polstra.com (austin.polstra.com [206.213.73.10]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id JAA07391 for ; Thu, 6 Aug 1998 09:58:47 -0700 (PDT) (envelope-from jdp@austin.polstra.com) Received: from austin.polstra.com (jdp@localhost) by austin.polstra.com (8.8.8/8.8.8) with ESMTP id JAA26496; Thu, 6 Aug 1998 09:57:07 -0700 (PDT) (envelope-from jdp) Message-Id: <199808061657.JAA26496@austin.polstra.com> To: gquinlan@qmpgmc.ac.uk Subject: Re: CPIO -i (into oblivion your archive) In-Reply-To: <01bdc140$784509a0$380051c2@greg.qmpgmc.ac.uk> References: <01bdc140$784509a0$380051c2@greg.qmpgmc.ac.uk> Organization: Polstra & Co., Seattle, WA Cc: bugs@FreeBSD.ORG Date: Thu, 06 Aug 1998 09:57:07 -0700 From: John Polstra Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org In article <01bdc140$784509a0$380051c2@greg.qmpgmc.ac.uk>, Greg Quinlan wrote: > The original archive was created using the command: > find . -print | cpio -ovBO NEW -HNEWC > > analising the command; > 1. find . -print > obtains a list of files in the current directory (NEW should not > exist yet) Not true. The find command and the cpio command run simultaneously, not in sequence left to right. Cpio easily could have created NEW before find had finished (or even started) scanning the current working directory. And that's what it did, in this case. > 2. cpio -ovBO NEW -HNEWC > create a cpio archive, verbose, large block, output to file NEW > using SYSV format (which does not truncate inodes for large file > systems) > > It is a very good possibility.... that some how before the archive was > created that the file NEW existed in the current directory, but > alphabetically NEW would be at the end of the archive, The find command does not work alphabetically. Also, unrelated to this problem: it is best to use "find -d" as recommended in the cpio manual page. -- John Polstra jdp@polstra.com John D. Polstra & Co., Inc. Seattle, Washington USA "Self-knowledge is always bad news." -- John Barth To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message