[svlug] Re: Mass copying (was: svlug digest, Vol 1 #619 - 1 msg)
Aaron Lehmann
aaronl at vitelus.com
Sun Mar 18 20:51:01 PST 2001
On Sun, Mar 18, 2001 at 06:58:36PM -0800, Rick Moen wrote:
> I would avoid trying to copy (let alone move) /dev, too, just on general
> suspicion. (Or, hey, give it a try on a system where you don't mind a
> little downtime, and see what happens.)
else if (S_ISREG (src_type)
|| (x->copy_as_regular && !S_ISDIR (src_type)
#ifdef S_ISLNK
&& !S_ISLNK (src_type)
#endif
))
{
copied_as_regular = 1;
/* POSIX says the permission bits of the source file must be
used as the 3rd argument in the open call, but that's not consistent
with historical practice. */
if (copy_reg (src_path, dst_path, x,
get_dest_mode (x, src_mode), &new_dst))
goto un_backup;
}
else
#ifdef S_ISFIFO
if (S_ISFIFO (src_type))
{
if (mkfifo (dst_path, get_dest_mode (x, src_mode)))
{
error (0, errno, _("cannot create fifo %s"), quote (dst_path));
goto un_backup;
}
}
-- copy.c (bad indentation and all), GNU fileutils 4.0.37
case 'R':
x.recursive = 1;
x.copy_as_regular = 0;
break;
-- cp.c, GNU fileutils 4.0.37
cp, with the -R option (or -a, which implys it), copies device files,
but not their contents.
You are right re: /proc. The proc filesystem is much more transparent:
files appear as real files rather than devices.
More information about the svlug
mailing list