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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

FTP

Status
Not open for further replies.

Mushr00m

IS-IT--Management
May 6, 2002
38
MY
I'm quiet new in Unix. I want to know, can I mget or get a folder with everything in it while running ftp whitout having to press y for each file transfer. or is it possible to ftp a folder (everthing inside it) to another server restoring its original folder rather than just the files in it. Can anyone help me on this?
 
To turn off interactive prompting use ftp -i <address>

You can then mget * everything within a folder without being prompted.

To transfer a whole folder and everything in it, your best bet is to 'tar' the folder from the directory above it using:

tar -cvf transfer.tar <folder_name>

and then ftp the resulting file (ie transfer.tar) to the recipient server. Place the tar file in the filesystem above where you want to create the folder and issue the extract command:

tar -xvf transfer.tar

You can check the contents of a tar file (without restoring the files) using tar -tvf transfer.tar

Hope this helps. Post back if more detail is required.
 
Tq Ken. I'll try this out. Thanks again.
 
Hello,
In Unix world there is no word call folder.
 
A tip: use relative path names with tar, it makes things so much easier when you tar relative to current dir.
 
Try to use [tt]wget[/tt] or [tt]curl[/tt]. You can get a whole bunch of files with'em
I hope it works...
Unix was made by and for smart people.
 
Tq for the advises. Now I can transfer all the fixes folders to another server without any hassle. Thanks a lot guys.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top