John Campbell writes:
>       I would probably write off tar and, instead, do:
>
> cd    (somewhere)
> find . -xdev -type d -print | cpio -ocv >tree.cpio

And combining this with the NUL-separation to ensure whitespace in
filenames is handled correctly, this would become
    find . -xdev -type d -print0 | cpio -0ocv >tree.cpio

And if you use "-H ustar" instead of the -c option (which corresponds
to "-H newc") then cpio will write out a tar archive which tar can
extract for you:
    find . -xdev -type d -print0 | cpio -0ov -H ustar > tree.tar

--Malcolm

--
Malcolm Beattie <[EMAIL PROTECTED]>
Linux Technical Consultant
IBM EMEA Enterprise Server Group...
...from home, speaking only for myself

----------------------------------------------------------------------
For LINUX-390 subscribe / signoff / archive access instructions,
send email to [EMAIL PROTECTED] with the message: INFO LINUX-390 or visit
http://www.marist.edu/htbin/wlvindex?LINUX-390

Reply via email to