[H-GEN] I'm stumped.......

Anthony Towns aj at azure.humbug.org.au
Thu May 21 22:53:50 EDT 1998


On Fri, May 22, 1998 at 11:09:18AM +1000, Byron Ellacott wrote:
> On Thu, May 21, 1998 at 01:04:47PM +1000, Michael Anthon wrote:
> > 1. Reboot from a floppy, create the partitions on the new HDD (swap and
> > linux native), mount both drives and then use the following  (cd /d1 &&
> > tar cf - . ) | ( cd /d2 && tar xfvp - )
> I can see two potential problems with this; the first is
> symlinks/hardlinks, as you mentioned, and the second is permissions -
> not sure how tar maintains them. 

] [aj at azure ~]$ man tar
] [...]
]        -p, --same-permissions, --preserve-permissions
]              extract all protection information
] [...]

> you can use cp with several
> arguments to do a copy without touching anything important .. -a, or
> -dpR, is a good start .. -d copies symlinks as symlinks, -p preserves
> owner, perm and timestamps, -R recurses :)

] [aj at azure ~]$ man cp
] [...]
]        -d, --no-dereference
]              Copy symbolic links as symbolic links  rather  than
]              copying  the files that they point to, and preserve
]              hard link relationships between source files in the
]              copies.
] [...]

AFAIT there's no way of making tar preserve hard links (although it
preserves symlinks by default anyway). Of course, they could think
preserving hard links so trivially obvious and simple that it's
not worth mentioning in the man page. I'm too lazy to actually try
it to find out.
 
HTH, FWIW, etc.

Cheers,
aj

-- 
Anthony Towns <aj at humbug.org.au> <http://azure.humbug.org.au/~aj/>
I don't speak for anyone save myself. PGP encrypted mail preferred.

      ``It's not a vision, or a fear. It's just a thought.''
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 434 bytes
Desc: not available
URL: <http://lists.humbug.org.au/pipermail/general/attachments/19980522/f665d59a/attachment.sig>


More information about the General mailing list