Last change
on this file since 18108 was 7783, checked in by tbretz, 18 years ago |
*** empty log message ***
|
-
Property svn:executable
set to
*
|
File size:
773 bytes
|
Line | |
---|
1 | #!/usr/bin/perl
|
---|
2 | #
|
---|
3 | # synchronizes logfiles to pc15
|
---|
4 | # 2005-01-10 rwagner@mppmu.mpg.de
|
---|
5 |
|
---|
6 | system "cd /remote/home/pc4/stesy/Cosy";
|
---|
7 |
|
---|
8 | sync_dir("rep","rep",3);
|
---|
9 | sync_dir("log","log",3);
|
---|
10 | sync_dir("tpoint","txt",3);
|
---|
11 |
|
---|
12 | sub sync_dir() {
|
---|
13 | $directory=$_[0];
|
---|
14 | $extension=$_[1];
|
---|
15 | $days=$_[2];
|
---|
16 | #@files = `ls $directory/`;
|
---|
17 | print "find $directory/ -ctime -$days\n";
|
---|
18 | @files = `find $directory/ -ctime -$days`;
|
---|
19 | foreach (@files) {
|
---|
20 | $file=`basename $_`;
|
---|
21 | ($id,$date,$nr,$ext)=split(/[_\.]/,$file);
|
---|
22 | if ($id eq "cosy" || $id eq "tpoint" || $id eq "starg") {
|
---|
23 | print "$id_"."$date"."_"."$nr".".$extension -> $date\n";
|
---|
24 | system "mkdir -p /remote/disc01/pc15/drivelogs/$date";
|
---|
25 | system "rsync $directory/$id"."_"."$date"."_"."$nr".".$extension /remote/disc01/pc15/drivelogs/$date/";
|
---|
26 | }
|
---|
27 | }
|
---|
28 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.