[Techtalk] Re: Copying complete directories
John Clarke
johnc+linuxchix at kirriwa.net
Thu Mar 25 13:49:44 EST 2004
On Wed, Mar 24, 2004 at 04:19:06 -0800, Lucky Lady wrote:
> needed. Is there a way to copy entire directories
> using FTP? mget works for multiple files not
Yes, if you use ncftp. 'get -R dir' downloads everything under 'dir'.
It might preserve permissions but it won't preserve owner and group
information. The easiest way to do that would be to use tar (as root)
to create an archive on the source host:
tar -cpf files.tar source_dir
then use ftp or rsync or scp or whatever else you like to copy files.tar
to the new host, and extract them with
tar -xpf files.tar
also as root. This will create a directory called 'source_dir' on the
new host with all the files and directories from the original host with
all the users, groups and permissions preserved.
Cheers,
John
--
`... what I'd really like to know is how to undermine the pervasive belief
that "an ignorant manager is a good manager".'
-- Richard Chirgwin
More information about the Techtalk
mailing list