gargamel100
Technical User
HI all,
I need your help if someone can can help
In an directory I have
-rw-r--r-- 1 ggggg ggggg 196846 2007-04-04 19:46 rrrrr_20070404214503_44538.txt
-rw-r--r-- 1 ggggg ggggg 192037 2007-04-04 20:02 rrrrr_20070404220002_44539.txt
-rw-r--r-- 1 ggggg ggggg 182503 2007-04-04 20:16 rrrrr_20070404221503_44540.txt
-rw-r--r-- 1 ggggg ggggg 162382 2007-04-04 20:32 rrrrr_20070404223003_44541.txt
-rw-r--r-- 1 ggggg ggggg 168154 2007-04-04 20:46 rrrrr_20070404224502_44542.txt
-rw-r--r-- 1 ggggg ggggg 161118 2007-04-04 21:02 rrrrr_20070404230002_44543.txt
-rw-r--r-- 1 ggggg ggggg 151536 2007-04-04 21:16 rrrrr_20070404231502_44544.txt
using this
ls -l | awk '{if ( $8~/^ggggg/ ) print $6 "\t" $7 "\t" $8 }'
I can filter date, time and filename. Every 14 min from one machine, and every 16 min from other machine I got new file, as above, but time stamp is different, part 21:02, 21:16 and so on. I need to find out some solution how transfer most recent file from this directory to another machine using ftp. FTP implementation is not problem,and when I write script I will put it in cron table to run every 20 min and fetch last file transfered to that directory. But I can not realise my how select last recent file, in directory, because time parameter is changing every time the file is transfered to this directory. If anybody has some hint to direct, it would be very helpful.
I can use awk and shell scripting tools.
best wishes and regards
Gargamel100
I need your help if someone can can help
In an directory I have
-rw-r--r-- 1 ggggg ggggg 196846 2007-04-04 19:46 rrrrr_20070404214503_44538.txt
-rw-r--r-- 1 ggggg ggggg 192037 2007-04-04 20:02 rrrrr_20070404220002_44539.txt
-rw-r--r-- 1 ggggg ggggg 182503 2007-04-04 20:16 rrrrr_20070404221503_44540.txt
-rw-r--r-- 1 ggggg ggggg 162382 2007-04-04 20:32 rrrrr_20070404223003_44541.txt
-rw-r--r-- 1 ggggg ggggg 168154 2007-04-04 20:46 rrrrr_20070404224502_44542.txt
-rw-r--r-- 1 ggggg ggggg 161118 2007-04-04 21:02 rrrrr_20070404230002_44543.txt
-rw-r--r-- 1 ggggg ggggg 151536 2007-04-04 21:16 rrrrr_20070404231502_44544.txt
using this
ls -l | awk '{if ( $8~/^ggggg/ ) print $6 "\t" $7 "\t" $8 }'
I can filter date, time and filename. Every 14 min from one machine, and every 16 min from other machine I got new file, as above, but time stamp is different, part 21:02, 21:16 and so on. I need to find out some solution how transfer most recent file from this directory to another machine using ftp. FTP implementation is not problem,and when I write script I will put it in cron table to run every 20 min and fetch last file transfered to that directory. But I can not realise my how select last recent file, in directory, because time parameter is changing every time the file is transfered to this directory. If anybody has some hint to direct, it would be very helpful.
I can use awk and shell scripting tools.
best wishes and regards
Gargamel100