Posted on 5th July 20092 Responses
How Will I Ftp A Directory From One Unix Server To Another?
I would like to FTP a directory with its structure and contents from one UNIX server to another. Is there any command/script which can help me with this?
Comments
comment by
Posted on July 5, 2009 at 7:31 am
Posted on July 5, 2009 at 7:31 am
That’s easy, use —> tar -cvf directory.tar directory
once you get a directory.tar file, you can ftp this file over.
Leave a Response
Posted on July 5, 2009 at 7:31 am
rsync would be a better way of doing this
But if you have to use ftp then create a tar archive of the directory
tar cPvf file.tar directory
Compress it if it is quite large – gzip -9 file.tar
ftp file.tar or file.tar.gz to the other server
Then tar xvf file.tar on the other server (tar xzvf if it is compressed with gzip)