LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
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!

Notices


Reply
  Search this Thread
Old 04-17-2003, 04:18 AM   #1
john lee
Member
 
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?

Thanks.

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

Rep: Reputation: 53
you might look at rsync and
the manpage for that
 
Old 04-17-2003, 03:21 PM   #3
Burke
Member
 
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, 03:24 PM   #4
david_ross
Moderator
 
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, 01:19 AM   #5
john lee
Member
 
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.
 
  


Reply


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-03-2005 12:44 AM
how to make/run startup scripts/commands ViN86 Slackware 3 04-24-2004 11:02 AM
Running Scripts/Commands on Startup drknow Linux - Newbie 4 01-09-2004 06:14 AM
Linux commands in shell scripts james_cwy Linux - Newbie 4 11-10-2003 02:14 AM
Scripts won't run commands Xyphoid Linux - General 4 08-08-2002 09:49 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 03:17 AM.

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