![]() |
|
|
|
|
|||||||
| Forums | Portal | Register | Forum Rules | FAQ | Contribute | Members List | Arcade | Search | Today's Posts | Mark Forums Read |
| Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts here. |
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| please help in rsync | naree | SUN Solaris | 10 | 10-01-2008 04:34 AM |
| rsync vs cp | jsy | UNIX for Dummies Questions & Answers | 1 | 03-24-2008 01:51 PM |
| rsync over ftp | Hitori | UNIX for Advanced & Expert Users | 2 | 03-14-2008 10:42 AM |
| Rsync | darknite87 | UNIX for Advanced & Expert Users | 1 | 06-06-2002 12:37 PM |
| rsync | wz253 | UNIX for Dummies Questions & Answers | 6 | 09-04-2001 03:44 PM |
|
|
Submit Tools | LinkBack | Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
rsync in ftp
Hello, everyone.
I want to UP files in folder: FROM which is in local. to server folder: TO by ftp script. Code:
cd /$HOME/FROM # Begin FTP ftp -i -n $HOST << END user $USER $PASSWD # Command in FTP cd public_html/TO rsync -auv --delete FROM TO <--- I think this won't work but I want to do like this!! quit END # End FTP 2.txt 3.txt 4.txt and in TO folder, 1.txt 2.txt 3.txt there is some changes in file 3.txt, and i want to do on TO folder, 1. remove 1.txt 2. make no change to 2.txt 3. change 3.txt (because it has been changed in local) 4. put 4.txt After this, TO folder has changed to: 2.txt 3.txt 4.txt Now 3.txt is the new one. Please tell me how to do this in compact script!! THANKS. |
| Forum Sponsor | ||
|
|
|
#2
|
|||
|
|||
|
FTP Rsync mixup
I think you're mixing your commands.
ftp is a command for doing file transfers. Type "ftp" from your shell command line, then type "help". It will tell you what commands are available. rsync is another command for sync'ing two directories. So first, we have to know: what do you have available, rsync or ftp? Are you the administrator of your computers? How important is security to you? (rsync uses rexec which is notoriously insecure) Can you compile problems on your computers? If so, you may want to use ssh and the scp command. Do you have perl? This may make testing file modification times easier to test. The easiest answer, by far, is to use rsync. This is what rsync was designed to do. And for that you do not need a script- a one-line rsync command is all you need. But it sounds like you don't have it, otherwise you wouldn't be asking for a script, no? Well with more information we would be in a better position to answer the question in a way that meets your needs. |
|
#3
|
||||
|
||||
|
Quote:
|
|
#4
|
|||
|
|||
|
Thank you for kindness.
This is my env. ftp> help Commands may be abbreviated. Commands are: ! disconnect lpage nlist rate sndbuf $ edit lpwd nmap rcvbuf status account epsv4 ls ntrans recv struct append exit macdef open reget sunique ascii features mdelete page remopts system bell fget mdir passive rename tenex binary form mget pdir reset throttle bye ftp mkdir pls restart trace case gate mls pmlsd rhelp type cd get mlsd preserve rmdir umask cdup glob mlst progress rstatus unset chmod hash mode prompt runique usage close help modtime proxy send user cr idle more put sendport verbose debug image mput pwd set xferbuf delete lcd msend quit site ? dir less newer quote size ftp> Of course, there is no rsync command. >what do you have available, rsync or ftp? I have both. >Are you the administrator of your computers? I am admin of my notebook, but not admin of web server (XREA.com). I have my HomePage, on this server, and I want to update automatically. >How important is security to you? I want to send some of my personal text files, but I think security is not so important. >Can you compile problems on your computers? If so, you may want to use ssh and the scp command. I can't understand about this. >Do you have perl? Yes. And I can understand it. >The easiest answer, by far, is to use rsync. I have to input password and username, when I want to get into the server computer. So, I don't know what the expression on rsync will be. Does this make sense? Sorry for my bad English. |
|
#5
|
||||
|
||||
|
I think this thread in the frequently asked questions is what you are looking for.
|
|
#6
|
|||
|
|||
|
I will learn this.
THANK YOU! |
|||
| Google The UNIX and Linux Forums |