sample lftp command lines?

Harold Hallikainen harold at hallikainen.com
Wed Aug 24 03:47:03 UTC 2005


> Harold Hallikainen wrote:
>> As I SLOWLY move stuff from an RH8 to an FC4 system, I've found that
>> ncftp
>> is not included in FC4, but lftp is included. I have a script that does
>> a
>> daily ftp of a tar file to a remote server. I'm having difficulty
>> figuring
>> out from the man page on lftp what a command line would look like that
>> would log me in to the remote server and put the local file in the
>> appropriate remote directory. Anyone know of some sample lftp command
>> lines?
>
> ncftp comes with FC4.  It's not part of the "default" install
> configurations, but you can "yum install ncftp" and get it, either from
> one of the repos on the net or from your DVD or CD collection.
>
> lftp isn't that hard to grok.  Just put the commands you want to run in
> some file somewhere, then launch lftp with the "-f" flag and specify the
> name of the script file.  Sample script file, "/tmp/lftp.scp":
>
> 	user remoteusername remoteuserpassword
> 	cd /remote/directory
> 	lcd /local/directory
> 	put name-of-tar-file
> 	exit
>
> To run it: "lftp -f /tmp/lftp.scp".
>
>> THANKS!
>>
>> Harold
>> ps - I'm CLOSE to getting everything working! I had to modify a buncy of
>> php stuff to work on the new machine. I've got this ftp problem and some
>> perl stuff to update, then it might be ready to put on line!
>
> To be brutally honest, rsync is more suited to this sort of thing.
> Using rsync in an ssh tunnel is even better and far more secure to boot.
> Assuming the data you're copying around is in the same directory or
> directory tree, rsync would obviate the need to tar it up in the first
> place.

IT WORKS! I added open hostname to the top of the script. I appreciate the
help and the brutal honesty. I am using rsyncbetween my own servers, but
my ISP does not support anything other than ftp uploads. lftp did it.

Thanks!

Harold


-- 
FCC Rules Updated Daily at http://www.hallikainen.com




More information about the Redhat-install-list mailing list