Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 06 Aug 1998 09:57:07 -0700
From:      John Polstra <jdp@polstra.com>
To:        gquinlan@qmpgmc.ac.uk
Cc:        bugs@FreeBSD.ORG
Subject:   Re: CPIO -i (into oblivion your archive)
Message-ID:  <199808061657.JAA26496@austin.polstra.com>
In-Reply-To: <01bdc140$784509a0$380051c2@greg.qmpgmc.ac.uk>
References:  <01bdc140$784509a0$380051c2@greg.qmpgmc.ac.uk>

next in thread | previous in thread | raw e-mail | index | archive | help
In article <01bdc140$784509a0$380051c2@greg.qmpgmc.ac.uk>,
Greg Quinlan <gquinlan@qmpgmc.ac.uk> 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



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