Re: Moving Debian from one HD to another
Hello.
David L. Johnson said:
[Klippa, klapp, kluppit]
> cp /* /.* /foobar
>
> cp --recursive /usr /var /etc /root /foobar
>
> (this should give copies or everything in the standard distribution into
> /foobar/. I may have forgotten a directory, though). Don't copy /proc.
Just wanted to warn you that cp copies symbolic links as real files.
Thus if you had:
-rw-r----- 1 ms318 erisoft 4 Apr 11 11:07 jjj
lrwxrwxrwx 1 ms318 erisoft 3 Apr 11 11:07 kkk -> jjj
in old and did "cp -r old new/" you would get
-rw-r----- 1 ms318 erisoft 4 Apr 11 11:07 jjj
-rw-r----- 1 ms318 erisoft 4 Apr 11 11:07 kkk
in new/old/.
(I tested this on a Solaris system, so I'm not 100% about the behaviour on
Debian, but I think it ought to be the same.)
The solution to this is to use tar (as in another Debianer's letter):
"tar -cf - old | (cd new; tar -xpf - )".
[Klippa, klapp, kluppit]
> Wait for someone else to tear me apart on this list before you try it.
> Please, folks, what is wrong with this??
>
No tearing -> no tears.
> --
>
> David L. Johnson dlj0@lehigh.edu dlj0@netaxs.com
> Department of Mathematics http://www.lehigh.edu/~dlj0/dlj0.html
> Lehigh University
> 14 E. Packer Avenue (610) 758-3759
> Bethlehem, PA 18015-3174
>
>
Happy,
Martin S.
Reply to: