DU 4.0B +6 - "# find . -mount -depth -print | cpio -pdm /mnt"

From: Brian C Hill <bchill_at_bch.net>
Date: Mon, 23 Feb 1998 11:26:38 -0800 (PST)

        Hello Managers,

        The "find/cpio" method of copying files works great on
SunOS 4 & 5 - it maintains timestamps, permissions, ownership and file
types. But it has never really worked on Digital Unix. I always get
some kind of an error when I do it either of these two ways:

        # cd /
        # find . -mount -depth -print | cpio -pdm /mnt

        or

        # cd /
        # find . -mount -depth -print > files
         # cpio -pdm /mnt < files

The last few lines of the error are:

        .
        .
        .
        /mnt/sbin/advfs/mountlist
        /mnt/sbin/advfs/mssh
        /mnt/sbin/advfs/shblk
        /mnt/sbin/advfs/shfragbf
        cpio: gitout:load_kk:c_install:getsysname:getpasswd:gettimezone:getdate:load_usr_pak:tunesys:doconfig : No such file or directory
        32284 Blocks

        (those are all files in /sbin/it.d, but that doesn't trigger
        any ideas for me).

BUT, when I do it this way, it works,

        # cd /
        # for i in `find . -mount -depth -print` ; do
        # ech "$i" | cpio -pdm /mnt
        # done

it works fine (obviously this is the stupider way, invoking cpio
hundreds of times), which means that it probably isn't any one file
that is causing the problem. Why is this? What _IS_ going on? Is cpio
having a problem with lists of filenames?

        I usually use "cp -Rp /a /b", which works well under Dig Unix
(The SunOS cp won't do symlinks right or ownership - the xpg4 cp's -R
will do ownership right, but still not symlinks), but I needed to be
able to use "-mount" to copy only stuff on the root partition, which
you obviously cannot do with cp -Rp.

        Am I missing something about cpio?

   _____________________________________________________________________
  / Brian C. Hill bchill_at_bch.net http://brian.bch.net \
  | Systems Programmer University of California, Davis |
  | Unix Specialist BCH Technical Services |
Received on Mon Feb 23 1998 - 20:27:10 NZDT

This archive was generated by hypermail 2.4.0 : Wed Nov 08 2023 - 11:53:37 NZDT