I tried +4 and -4, I had seen others using that notation (after a google group search). +4 seemed to return everything, -4 returned nothing (exactly like a plain 4).
It's all very odd. I'm tempted to have my script touch all the files in a directory when it adds/updates a file in the same location..that would make using tmpwatch feasable. > -----Original Message----- > From: Wayne Holdcroft [mailto:[EMAIL PROTECTED]] > Sent: Thursday, December 05, 2002 4:54 PM > To: [EMAIL PROTECTED] > Subject: RE: Find -mtime doesn't seem to work properly. > > > Hi > > Make the 4 into a +4 and see if that helps. > > Bye > > Wayne Holdcroft > IT Systems Administrator > International Reservoir Technologies, Inc. > > > -----Original Message----- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED]] > On Behalf Of Brenden > Walker > Sent: Thursday, December 05, 2002 2:41 PM > To: '[EMAIL PROTECTED]' > Subject: Find -mtime doesn't seem to work properly. > > I'm using RH7.3 (with all the latest). I have a directory > with several temporary subdirectories that I'd like to clean up. > > find /home/worktmp -type d -mtime 4 | xargs rm -rf > > (whole bunches of tmp1, tmp2, tmp3 directories there). > > I only want to delete the directories if the last modified > time is 4 days old in this example. Well, this doesn't work. > When I was testing last night there were directories with > modify times from August this year... > > I cleaned it up using tmpwatch, but this is going to kill > files in the directories regardless of the directory last > modified time, I only want to delete all files and the > directory when all files are older than x days. > > Anybody have suggestions? From what I can tell the -mtime > should work, but it simply does not (or I'm using it totally wrong ;-) > > > > > > > -- > redhat-list mailing list > unsubscribe mailto:[EMAIL PROTECTED]?subject=unsubscribe > https://listman.redhat.com/mailman/listinfo/redhat-list > -- redhat-list mailing list unsubscribe mailto:[EMAIL PROTECTED]?subject=unsubscribe https://listman.redhat.com/mailman/listinfo/redhat-list