[Chicago-talk] Merging two dir's into a third

Steven Lembark lembark at wrkhors.com
Wed Feb 18 13:33:19 CST 2004

-- Don Drake <don at drakeconsult.com>

> This will work:
># cd dira
># tar cvf - *  | (cd ../dirc; tar xvf -)
># cd ../dirb
># tar cvf - *  | (cd ../dirc; tar xvf -)

Problem with this is that tar exits zero on most
errors, which makes it hard to tell if the job
completed. For example, this will exit zero on
a filesystem-full error (at least with the tar's
I've used on linux, solaris, hp-ux, osf/1, and

cpio exits non-zero if it cannot complete a file:

Steven Lembark                               2930 W. Palmer
Workhorse Computing                       Chicago, IL 60647
                                            +1 888 359 3508

More information about the Chicago-talk mailing list