cpio/afio writing directories?

Richard Hargrove richardh at killer.UUCP
Sat Jun 4 12:47:37 AEST 1988


In article <23 at libove.UUCP>, root at libove.UUCP (The Super User) writes:
> My question: How do I tell afio/cpio that 
> 
> % echo '/x /y /z' | afio -o
> 
> means /x /y /z and all subfiles also?

The simplest way is one of either

	find /x /y /z -print | cpio -o...

or

	find /x /y /z -type f -print | cpio -o...

depending on whether you want directory information stored or not (it
will be important if you're restoring under a different uid).

The version of find(1) on uPort SYS V/AT has a -cpio option that invokes
cpio for you. I've seen references to versions supporting a -prune option 
which is used to control the depth of the descent of the tree walk.

richard hargrove
...!{ihnp4 | codas | cbosgd}!killer!richardh
--------------------------------------------



More information about the Comp.unix.questions mailing list