|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
You eat, breathe and sleep innovation. Build your mobile intelligence with BlackBerry® experts this July. Register Today! |
|
#1
|
|||
|
|||
|
Hi All!!!
I am trying to do a replication systems using ftp . I send all text files to my serve running suse 7.3 to directory. I wanna know if when I send a file to specify directory can I run a script in Perl to load the data to my database running in mysql? In another word, I want a process running all the time and when come a file this script process the file and then delete the file. I am the root and this is for local network. Can I do this? I am a newbie using Linux OS. TIA |
|
#2
|
||||
|
||||
|
Write a Perl script and run it on the cron every minute. Tell it that when it sees a new file (it will need to keep a list of files it's processed already), to dump it into the database then delete it. It won't happen immediately (the dumping) when you copy up the file, but it will happen within the minute.
__________________
Alex (http://www.alex-greg.com) |
|
#3
|
||||
|
||||
|
Boy, I had a case of deja vu when I saw this thread... oh.. here's why.. I already answered it:
http://forums.devshed.com/showthrea...&threadid=44563 Did you think the solution was going to change if you asked the same question in a different forum? The only difference is that alex suggests once a minute and said hour. Please don't cross-post the same question unless it's appropriate to do so (which it RARELY is). |
![]() |
| Viewing: Dev Shed Forums > Operating Systems > Linux Help > Run a file when modifier the folder? |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|