![]() |
|
|
|
|
|||||||
| Forums | Portal | Register | Forum Rules | FAQ | Contribute | Members List | Arcade | Search | Today's Posts | Mark Forums Read |
| UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !! |
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| File transfer between unix and windows server | Tlg13team | HP-UX | 2 | 02-08-2008 07:40 AM |
| Transfer file from local unix server to remote server | indira | Shell Programming and Scripting | 2 | 05-03-2007 03:35 AM |
| Transfer file from local unix server to remote server | indira | HP-UX | 2 | 05-02-2007 02:15 PM |
| server Hangs during FTP transfer | sgoundar | Filesystems, Disks and Memory | 0 | 05-21-2006 03:33 PM |
| Transfer files from Unix server to Windows using FTP | gjsaravanan | UNIX for Dummies Questions & Answers | 1 | 08-22-2005 04:55 PM |
|
|
Submit Tools | LinkBack | Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
Transfer contents from one unix server to another
Hi Guys,
Well i dont have alot of experience in shell scripting. I am mostly into OOP. So i was given a task to "Transfer the contents of files in a zip format from one unix server to another unix server" What i am trying to do is create a shell script when runs will transfer all the files in zip format from one unix directory to another unix server directory. How can i do that? I've searched on google and most of the time they used " scp " command. I am not at work but i tried using something like this: Code:
data = /abc/web/docs/xyz.com/props scp $data/.*zip. fast:/xyz/abc/mlo.com/klm Thanks |
| Forum Sponsor | ||
|
|
|
#2
|
|||
|
|||
|
Hi
When using scp the format should be as follows scp <filename> user@foreignserver:<foreigndirectory> ie.. scp test1.zip root@server1:/tmp |
|
#3
|
|||
|
|||
|
Thank you for the reply frustrated.
Actually that might be correct for only one file command. What i am trying to do is that:- I have bunch of files in one unix directory. The name of that unix server is ABC. /user/web/abc.com/props. This is the path to my unix directory. in the props folder i might have 30 files(html, txt, etc). I have another unix server XYZ. What i am trying to do is transfer all the contents of props directory from ABC unix server to XYZ unix server in a zip file format. Your code might work for one file but i have 30 files which i need to bundle into zip folder and then transfer it to my another server. Hope i am clear enough. |
|
#4
|
|||
|
|||
|
zip all the files into one zip file then scp the single zip file.
|
|
#5
|
|||
|
|||
|
hmm good point porter. So the command should look something like this. If i would like to transfer that zip file into :
1) UNix server ( xyz) 2) Path (/home/web/xyz.com/temp) scp test.zip tempuser@xyz: /home/web/xyz.com/temp Am i correct? Thank you |
|
#6
|
|||
|
|||
|
Code:
scp test.zip tempuser@xyz:/home/web/xyz.com/temp Note also that the "scp" programs current directory on the remote end will start in the home directory of the user, so you can use relative paths if you so wish. Last edited by porter; 12-16-2007 at 01:09 PM. |
|
#7
|
|||
|
|||
|
Thank you porter. I will try this tomorrow at work and will post back :--). I appreciate all your help and frustrated.
|
|||
| Google The UNIX and Linux Forums |
| Thread Tools | Search this Thread |
| Display Modes | |
|
|