Xref: utzoo comp.sources.d:2220 comp.unix.questions:7372 Path: utzoo!utgpu!water!watmath!clyde!bellcore!tness7!killer!dcs!wnp From: wnp@dcs.UUCP (Wolf N. Paul) Newsgroups: comp.sources.d,comp.unix.questions Subject: Re: cpio/afio writing directories? Message-ID: <105@dcs.UUCP> Date: 3 Jun 88 11:46:15 GMT References: <23@libove.UUCP> Reply-To: wnp@dcs.UUCP (Wolf N. Paul) Distribution: comp Organization: DCS, Dallas, Texas Lines: 35 In article <23@libove.UUCP> root@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@dcs.UUCP TLX: 910-280-0585 EES PLANO UD