Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

ftp dir

Status
Not open for further replies.

kahn630

Technical User
Mar 10, 2005
29
US
Hi All, does anyone know the command to use when ftp-ing form one solaris 8 box to another to get an entire directory and its contents. I know that I can tar the dir and ftp it but I would rather just ftp the dir if possible.
 
cd /destination directory
mget *

There's also a variable you can set so it won't ask you about every file. This won't work for subdirectories.

Can I recommend sftp? You may already have it on your system. It's slower (because of encryption), but performs much like rcp.

scp -r username@destination:/directory /local-directory

 
Type [tt]prompt[/tt] before the [tt]mget[/tt] and it won't ask about every file.

I also second the [tt]scp[/tt] recommendation of spamly.
 
You can also tar your directory to one file. Transfer the file using ftp. If you run the tar capture as root, you can use the -p option to preserve existing owner and file privileges. Would be something like:

tar -cvfp filename.tar directory
ftp <workstation>
send filename.tar
tar -xvf filename.tar
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top