![]() |
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | 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 and shell scripting languages here. |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Accessing variables of one shell script in another shell script | rsendhilmani | Shell Programming and Scripting | 2 | 03-17-2009 01:17 AM |
| How to pass a parameter from one Shell-script to another Shell-script | subodhbansal | Shell Programming and Scripting | 2 | 09-22-2007 06:19 AM |
| How to Run a shell script from Perl script in Parent shell? | hifake | Shell Programming and Scripting | 16 | 08-28-2007 09:42 PM |
| Script to download file using wget | techie82 | Shell Programming and Scripting | 1 | 02-13-2007 07:45 PM |
| Automatic download of csv file using a shell script | figaro | Shell Programming and Scripting | 1 | 01-13-2007 08:53 PM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
||||
|
Shell script for FTP download
Dear All,
I have to download files from FTP server every monday. Presently i am downloading manually. I am thinking to put this into cron jobs. I am new in shell. Please advise to tune this script effectively. Also could anyone explain to add this into cron jobs... I have to download four folders. Each folders contain more than 200 files size of around 500 MB. Once download is over, that files to be replaced into our local server. This is my script... #!/bin/bash -vx ftp -in 10.41.141.14<<END_SCRIPT quote USER abc quote PASS xxxx bin prompt off cd /csi/endeca_chrome/dgraph_input -- this folder contains files... lcd /space/endeca_chrome/endeca/files/data/dgraph_input/mirror0/partition0/ -- this location is local directory for file replace... mget * bye END_SCRIPT Last edited by moorthygs; 09-04-2007 at 11:20 AM.. |
|
||||
|
Adding to crontab
As regards getting your script into crontab - log in as the user who needs to run the script and type crontab -e.
This will open 'your' crontab in VI. consult man crontab for the format you have to use to define when your script is to be invoked by cron. You can define seconds, minutes, hours, days, days of month etc etc. Each username has their own crontab - running crontab -e allows your to edit your own one. |
|
||||
|
crontab
Hey,
still i am not run the script using cron tab. Before i want the confrimation my script is correct or not? i am new for scriptring... I can download using mget in command line from ftp. But It's take long time to download compare than manual download using tools. my crontab entries to be 00 3 * * 1 -- every monday morning 3 am my script will execute. Please advise... Thanks, |
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|