Isn't it best to use a tar ?
cd /olddirectory tar cvf - . | (cd /newdirectory ; tar xvf - )
Will put everything across and keep perms / times etc
Neil.
From: Neil Marjoram
Isn't it best to use a tar ?
cd /olddirectory tar cvf - . | (cd /newdirectory ; tar xvf - )
Will put everything across and keep perms / times etc
as a belt and braces person this is also the way I would approach it, except that I would explicitly create an intermediate tarball so I had a backup to fall back on if it all went horribly wrong.
Keith
Neil Marjoram n.marjoram@vam.ac.uk writes:
Isn't it best to use a tar ?
cd /olddirectory tar cvf - . | (cd /newdirectory ; tar xvf - )
Will put everything across and keep perms / times etc
Why bother when mv does the job faster and more simply?
I don't like mv, if something goes wrong you may be left with nothing! Or full root filesystems (god bless programmers). With the tar you will keep the old dir whilst you check everything is OK in the new, then you can delete the old. For the paranoid back the whole thing up to a separate tar before you do anything at all, then as Keith says you will have a backup to fall back on when it all goes wrong.
BTW the tar is very quick, used it on Solaris for years to copy over whole filesystems when they run out of space, keeps links and everything so never need to worry. Use it now a lot to shift things.
Neil.
On Mon, 2003-06-16 at 11:52, Richard Kettlewell wrote:
Neil Marjoram n.marjoram@vam.ac.uk writes:
Isn't it best to use a tar ?
cd /olddirectory tar cvf - . | (cd /newdirectory ; tar xvf - )
Will put everything across and keep perms / times etc
Why bother when mv does the job faster and more simply?
Neil Marjoram n.marjoram@vam.ac.uk writes:
I don't like mv, if something goes wrong you may be left with nothing! Or full root filesystems (god bless programmers).
I think you must have missed the detail that the move is within a single filesystem in this particular case.