Result of find command different on 2 servers

ak17_hk

Verified User
Joined
Nov 7, 2006
Messages
77
hi guys.. i got a very weird problem..
there r 2 servers with DA installed..
i've made DA's system backup to run at 4:30am on both servers every night..
to make things tidy and not to kill the disk space.. i wrote a cleanup script to remove system backups that r 7 days old..
so the problem is.. when i run the exactly same script on the 2 servers.. one of them would start deleting folders that r 7 days old, while the other would delete folders that r 6 days old instead! :confused:
weird.. i tried running the command directly on the 2 servers:

find /backup/system -maxdepth 1 -mtime +6

the results r different?! instead.. the other server need to run the following command instead to show the same result:

find /backup/system -maxdepth 1 -mtime +5

so.. what's wrong with them?! i've no idea at all what could make such difference in the result of find command.. with all the folder structure the same..

the only difference of the 2 servers is that 1 is running centos 4.4 and 1 is running centos 5.4.. will that be the cause??? :eek:

any help would be appreciated!
 
Why does it matter as long as the info is getting removed? Read the man pages on find.

and +7 should remove everything older then 7 days.
 
Why does it matter as long as the info is getting removed? Read the man pages on find.

and +7 should remove everything older then 7 days.


of course i can make things to work if i tune the scripts for each server..
but it does matter as this weird problem does not allow us to use the same script on every server.. which was written in a sense of server independent.. now... it may become server dependent if such find command not even giving the same results on different centos servers... :(
 
If the find command runs differently on the two servers you need to troubleshoot why.

Are the servers using different versions of CentOS? Are they using different versions of find?

Are the versions of find described differently in their man files?

Surely the help you need is going to have to come from a CentOS specific resource. Have you tried the centos-users list?

Jeff
 
ak17_hk said:
the only difference of the 2 servers is that 1 is running centos 4.4 and 1 is running centos 5.4.

jlasman said:
Are the servers using different versions of CentOS?

I would say yes.
 
Sorry, I didn't see that. I'd suggest reading man find on both systems, looking for a difference. I also highly recommend the centos-users mailing list.

Jeff
 
Sorry, I didn't see that. I'd suggest reading man find on both systems, looking for a difference. I also highly recommend the centos-users mailing list.

Jeff

thanks.. i'll try my luck on the manual and centos mail list..
 
Back
Top