1753734 Members
4712 Online
108799 Solutions
New Discussion юеВ

Re: File consistency

 
Dennis Handly
Acclaimed Contributor

Re: File consistency

>do not create 4hours_marker file, it seems the command have error

What had an error? The touch didn't create the file? Any error messages?
heaman1
Regular Advisor

Re: File consistency

Thx Mel Burslan ,

for your latest program , does the -newer mean only compare the newer files so I need to setup a crontab job to run it in every 4 hour ? if yes , can advise if I want the program can be run at anytime to check the files in past 4 hours ( not only the newer file ) , what can i do ? thx
Dennis Handly
Acclaimed Contributor

Re: File consistency

>does the -newer mean only compare the newer files so I need to setup a crontab job to run it in every 4 hour?

Yes.

>if I want the program can be run at anytime to check the files in past 4 hours (not only the newer file), what can I do?

Then you need to do date arithmetic to invoke touch. Or use perl. Or possibly gnu find that allows minutes in the -mtime.
heaman1
Regular Advisor

Re: File consistency

thx reply ,

Then you need to do date arithmetic to invoke touch. Or use perl. Or possibly gnu find that allows minutes in the -mtime. -->

can you please advise how to do it ? thx
heaman1
Regular Advisor

Re: File consistency

can advise how to use find to search the files on remote server ? thx
heaman1
Regular Advisor

Re: File consistency

thx all,

Rather than copy the files back for comparison , is it possible to export the files to a list , then compare the lists in both servers , because copy the files back to local server , it seems increase the network traffic , can advise what can i do ? thx
Dennis Handly
Acclaimed Contributor

Re: File consistency

>can you please advise how to do it?

It's called hand waving, you are suppose to give up. ;-) Or manually enter the touch time for 4 hours ago.
(I personally would just write a C program to subtract 4 hours.)

>date arithmetic to invoke touch.

I don't know if Clay's date script will do minutes?
Some threads that mention it and other time manipulation with perl:
http://forums.itrc.hp.com/service/forums/questionanswer.do?threadId=951459
http://forums.itrc.hp.com/service/forums/questionanswer.do?threadId=1048731
http://forums.itrc.hp.com/service/forums/questionanswer.do?threadId=1120611

Gnu find:
http://hpux.connect.org.uk/hppd/hpux/Gnu/findutils-4.4.2/