I want to UP files in folder: FROM which is in local.
to server folder: TO by ftp script.
Now, in my local FROM folder, I have 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.
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.
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.
I wish to copy all the files & folder under /web/Transfer_Files/data/ on mymac1 (Linux) to remote server mybank.intra.com (Solaris 10) /tmp/ location
I am using Ansible tool synchronize module which triggers the unix rsync command as below:rsync --delay-updates -F --compress --archive --rsh=ssh... (2 Replies)
OS: Solaris 9
Configuration /etc/syslog.conf
daemon.debug
/etc/inetd.conf
ftp stream tcp6 nowait root /usr/sbin/in.ftpd in.ftpd -A -l -d
Found the ftp.log only generate those entries from other servers/hosts.
Can we trace on all ftp entries either from/to the server?
... (6 Replies)
Hello All,
I am trying to connect to ftp server and get the files. Also i need to rename the file in other ftp dir.
rename method is not allowing me to rename the file in other dir. When i tried copy command by using net::FTP:FILE then perl says it is not installed.
Can some body help me to... (2 Replies)
how to connect to ftp server in passive mode?
ftp server.abc
and how can i see ftp settings, doesn't exist some ftpd.conf
there is some other file where i check the options and configurations of ftp server?
Thanks (3 Replies)
Hi all,
I would need a bash script to sync/transfer folders recursively via FTP/RSYNC
(I initially planned to use FTP but I heard RSYNC would fit a lot better for this job(?))
The situation:
3 different Linux servers
1. source
2. destination - Samba
3. Server where the script runs on
... (2 Replies)
Hi all,
I'm using the following script to automated ftp files to 1 ftp servers
host=192.168.0.1
/usr/bin/ftp -vi >> $bkplog 2>&1 <<ftp
open $host
bin
cd ${directory}
put $files
quit
ftp
and the .netrc file contain
machine 192.168.0.1
login abc... (4 Replies)
Hi,
I have a ftp script which first gets all the file names and echo's the latest file.
I'm using another ftp command sets to get the file name given by first ftp. The problem is the parameter is not accepted by second ftp. The error message i'm getting is
> Rename Temp File calloc:ICMP... (5 Replies)
Hi,
We have some clients who will place huge files in to one of the remote server.
And the shell script written in our local server to retrieve client files (using FTP) placed on one of the remote server of ours by clients.
My question Is there any FTP command/script to check from my local... (1 Reply)
Hello,
A couple of times per week, i receive emails notifications when files are available for processing.
Currently i read these eamails with a java program and store the attachement on my C: drive and would now like to generate a PC script to send this file name up to UNIX-Solaris and... (3 Replies)