![]() |
|
|
|
|
|||||||
| Forums | Portal | Register | Forum Rules | FAQ | Contribute | Members List | Arcade | 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 here. |
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| How to manage the .nfs files generated by the system | dowell | Filesystems, Disks and Memory | 0 | 06-06-2008 10:25 AM |
| How to list all the files which are not generated today | redlotus72 | UNIX for Dummies Questions & Answers | 2 | 10-05-2007 06:27 AM |
| get the last generated log file | ragha81 | Shell Programming and Scripting | 8 | 12-19-2006 08:02 AM |
| generated CSV file on AIX | mpang_ | Shell Programming and Scripting | 0 | 09-05-2006 08:01 PM |
| Core File Not Being Generated in AIX | S.P.Prasad | High Level Programming | 6 | 09-23-2003 02:40 AM |
|
|
Submit Tools | LinkBack | Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
Ftp all the generated files
Hi All,
I'm working on a ftp shell script in which I'm tranfering files from one sever to another using ftp. Some program generates files at undefined time & throughout the day. I have to transfer the files time to time.. i.e. once the file is generated, it should be transfered at the very moment or as early as possible. If I write a script to transfer the latest file & schedule it wth maximum frequecy, say 3 mins/4 mins , then it'll be unnecessarily overwrite the files again and again.. even the question remains wht if there are 2 files generated in 3 mins.. only the latest file will get transfer. Wht should be done to tackle with this.. Any suggestions? Thanks in advance. Regards, im_new |
| Forum Sponsor | ||
|
|
|
#2
|
|||
|
|||
|
you only want to transfer the latest file?
one way 1) create a dummy file 2) use the find command and the -newer option. check the man page of find 3) if its newer, transfer the file 4) update the dummy file with the time stamp of that latest file 5) and so on |
|
#3
|
|||
|
|||
|
Thanks for the suggestion..
Actually the files are having format as- unique'timestamp'.rtf e.g UNIQUE20071219030529.rtf & the filename changes as per the timestamp. Hw can I keep track of these files? |
|
#4
|
|||
|
|||
|
it doesn't matter, as the file is created, it will have an OS time stamp. Use the OS time stamp should be ok.
|
|||
| Google The UNIX and Linux Forums |