cpio/afio writing directories?

Wolf N. Paul wnp at dcs.UUCP
Fri Jun 3 21:46:15 AEST 1988


In article <23 at libove.UUCP> root at libove.UUCP (The Super User) writes:
 >I'm using afio (operationally very like cpio, for those who've never
 >seen afio; if you use cpio and don't have afio, get afio!) to back up
 >a SCO Xenix file system. But I doubt that the system type matters any.
 >
 >Basically, it seems that cpio/afio, unlike tar, require real file names,
 >not just directory names... such that:
 >
 >% tar cf tarfile /x /y /z
 >
 >will back up the directories /x /y /z and all their files and
 >subdirectories, but:
 >
 >% echo '/x /y /z' | afio -o archive
 >
 >will simply create information about the *directories* /x /y /z on the
 >archive, and *not* backup the files and subdirectories in them!
 
Correct! If you look at the man page for cpio, all of the examples use
"find" to get the list of files to back up. Thus, as a minimum this is
what your commandline should look like:

% find /x /y /z -print | afio -o archive

or the corresponding cpio example:

% find /x /y /z -print | cpio -oc archive

This is consistent with the software tools approach -- if there is a command
"find" which can list a directory hierarchy, why put the same code into the
archiver? Just connect the two with a pipe.
-- 
Wolf N. Paul * 3387 Sam Rayburn Run * Carrollton TX 75007 * (214) 306-9101
UUCP:     ihnp4!killer!dcs!wnp                 ESL: 62832882
DOMAIN:   wnp at dcs.UUCP                         TLX: 910-280-0585 EES PLANO UD



More information about the Comp.unix.questions mailing list