tru64-unix-managers (formerly alpha-osf-managers) (1994-2012)
 help / color / mirror / Atom feed
* DU 4.0B +6 - "# find . -mount -depth -print | cpio -pdm /mnt"
@ 1998-02-23 19:26 bchill
  0 siblings, 0 replies; only message in thread
From: bchill @ 1998-02-23 19:26 UTC (permalink / raw)
  To: tru64-unix-managers

	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@bch.net   http://brian.bch.net   \
  | Systems Programmer		University of California, Davis    	|
  | Unix Specialist		BCH Technical Services			|

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~1998-02-23 19:26 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
1998-02-23 19:26 DU 4.0B +6 - "# find . -mount -depth -print | cpio -pdm /mnt" bchill

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox