Welcome to the most active Linux Forum on the web.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 04-17-2003, 03:18 AM   #1
john lee
Registered: Jun 2001
Location: Sydney, Australia
Posts: 42

Rep: Reputation: 15
Unhappy Running ftp commands in scripts

Hi all,

I have searched the forum first to make sure that no one has raised the same question before.

Anyway, my question is supposed to be an easy one - I know how to ftp send/receive files between ftp sites. However, there are ftp tasks which I have to do repeatedly.

I understand I can add a job to crontab so that the job could run regularly at a time I assign. However, I don't know how to group those ftp commands together so that cron will execute it.

Do I just put the following in a file like the following:

ftp host
ftp user
ftp send......

Any guru can give me a hint I'd appreciate?


Old 04-17-2003, 03:53 AM   #2
Senior Member
Registered: Dec 2002
Location: Mosquitoville
Distribution: RH 6.2, Gen2, Knoppix,arch, bodhi, studio, suse, mint
Posts: 3,198

Rep: Reputation: 53
you might look at rsync and
the manpage for that
Old 04-17-2003, 02:21 PM   #3
Registered: Dec 2002
Location: Virginia, USA
Posts: 131

Rep: Reputation: 15
I generally use ncftpget/ncftpput in my scripts. It's worked well for my cron jobs.
Old 04-17-2003, 02:24 PM   #4
Registered: Mar 2003
Location: Scotland
Distribution: Slackware, RedHat, Debian
Posts: 12,047

Rep: Reputation: 66
Take a look at ftpcopy for a quick solution to download files - and use expect to create any advanced scripts.
Old 05-07-2003, 12:19 AM   #5
john lee
Registered: Jun 2001
Location: Sydney, Australia
Posts: 42

Original Poster
Rep: Reputation: 15
Thank You

Actualy, I solved the problem by using SAMBA. It is much neater than coding ftp scripts. Thanks anyway.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Issuing Telnet commands via bash scripts Kaj Programming 2 01-02-2005 11:44 PM
how to make/run startup scripts/commands ViN86 Slackware 3 04-24-2004 10:02 AM
Running Scripts/Commands on Startup drknow Linux - Newbie 4 01-09-2004 05:14 AM
Linux commands in shell scripts james_cwy Linux - Newbie 4 11-10-2003 01:14 AM
Scripts won't run commands Xyphoid Linux - General 4 08-08-2002 08:49 PM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 06:23 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration