![]() |
|
|
|
|
|||||||
| Forums | Portal | Register | Forum Rules | FAQ | Contribute | Members List | Arcade | Search | Today's Posts | Mark Forums Read |
| Linux RedHat, Ubuntu, SUSE, Fedora, Debian, Mandriva, Slackware, Gentoo linux, PCLinuxOS. All Linux questions here! |
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Grepping the last 30 minutes of a log file... | jtelep | Shell Programming and Scripting | 2 | 03-05-2008 09:27 PM |
| Script to move certain number of files every 10 minutes. | amitsayshii | UNIX for Dummies Questions & Answers | 1 | 02-26-2007 01:55 AM |
| Issue with setup.hp file for webserver | vishalm | HP-UX | 1 | 12-21-2006 05:45 PM |
| get last 5 minutes' log from log file? | fedora | Shell Programming and Scripting | 5 | 07-19-2006 01:49 PM |
| Convert minutes to hours, minutes, seconds | Vozx | Shell Programming and Scripting | 1 | 12-08-2005 10:24 PM |
|
|
Submit Tools | LinkBack | Thread Tools | Search this Thread | Display Modes |
|
#1
|
||||
|
||||
|
How can I move a file to a webserver every 5 minutes?
I'm using Ubuntu and I have a text file I want to FTP to a web server every 5 minutes. I want to overwrite the existing file every time so I don't have tons of the same file.
|
| Forum Sponsor | ||
|
|
|
#2
|
||||
|
||||
|
For scheduling the file's transfer use cron manager, or whatever is available under Ubuntu. For the FTP transfer - what have you done so far ? Should this task be script, if yes, what language you have knowledge in ? Else, you can always look at the forum's base, there are many examples on how to automate file transfer via shell script for example.
|
|
#3
|
||||
|
||||
|
Some ftp servers are set up not to allow this or put version numbers on files that already exist. Check with the admin of the ftp server.
Also, be nice and write your script to only transfer the file if it has changed. I have a client who thinks it's just peachy to ftp me 5,000 files several time every day, always the same files. |
|
#4
|
||||
|
||||
|
try putting this in cron to run every 5 mins.
this should work: wget ftp://username |
|
#5
|
|||
|
|||
|
If you don't want to mess with crontab, just write a shell script that does and infinite loop with sleep(5m) inside it followed by the wget/ftp command to put the file there.
|
|
#6
|
||||
|
||||
|
1. keep your script running continuously is not a good option. Let cron do that.
2. but yes create a script which will take a backup of your existing file. then remove old one and copy new one. 3. Also keep check in script if it has been copied properly on remote server. you can use md5sum to check that. - $nilesh |
|
#7
|
|||
|
|||
|
Why isn't it a good option?
|
|||
| Google The UNIX and Linux Forums |