Re: moved to new disk, now amanda wants to do level 0's on whole system
2003-11-14 11:29:30
Hi,
> The times reported by an ls -l seem to be sane, and of those perms I
> checked, they were preserved ok. The major hiccup I had was that cp
> doesn't do ".name" files
Of course "cp" does copy dot-files. I think you may have stumbled over
the shell asterisk.
If you say "cp -rp * /somewhere", the shell expands the "*" to all files
and dirs in that directory except those beginning with a dot!
Try "echo *" - you get a list of the files in the current directory but
without the dot files.
You may use "cp * .??*" as a workaround (.??* means all filenames that
begin with a dot but excludes ".." which would be too much), but that
won't cover files like ".a" or similar dot-and-one-letter filenames.
The better solution is the indicated "tar cf - ." which takes every file
in the current directory (excluding the parent dir "..").
> and once went wild and copied the whole 2.5
> gig /root directory into /root/.ymessenger/root when I tried to make
> it do it with a different wild card pattern.
Maybe something like "cp * .*" which also includes ".."? ;-)
> And links definitely weren't a problem that I've run into since the
> drive switch.
Maybe you haven't realized the problem yet. An ordinary "cp" will copy
the file a symbolic link points to instead of the link. So it can
happen that your copy becomes larger than the original as you create
additional copies of files that had symbolic links pointing to them.
You can run into serious trouble if you have users who use symlinks.
To sum it up: Use tar. :-)
Christopher
--
======================================================
Dipl.-Ing. Christopher Odenbach
HNI Rechnerbetrieb
odenbach AT uni-paderborn DOT de
Tel.: +49 5251 60 6215
======================================================
|
|
|