problem in mtime

Hey champs,

i am using the following commands to search 1day files available under a dir by shell script.

find <dirname> -type f -mtime +1

sometimes it used to show me correct results.....but sometimes it's not ???

if the above one not working perfect i.e. not showing me the exact files .

then i used to issue the following one,

find <dirname> -type f -mtime 1

surprisingly it works fine ........:confused:

SO can anyone help me why so strange is happening??? and how can i get the exact file name
under certain dir of 1day older.....

Are you looking for files less than 24h:00m:00s old?

touch -t 12171100.01 testfile
find . -newer testfile

file 24:00:00:00 -> 48:00:00 old? between 1 -2 days old.

touch -t 12161100.01 oldfile
touch -t 12171100.01 newfile

find . -newer newfile  -a ! -newer oldfile

It's not clear to me what you want...

why find command is not giving the expected output everyday????

let CLSS is my home dir, under that 5 sub dir(s) are there.
i have a script which loop thru all the sub-folders available under CLSS,
then i issue the following command to get 1day older files.

find . -mtime +1 -type f -exec ls -1 {} \;

then i have to remove those files.
But for some sub-folders it is giving me correct result....but for some not as expected ???

so if i used find . -mtime 1 -type f -exec ls -1 {} \; => gives me perfect results .

system date
Wed Dec 26 01:43:57 SGT 2007

folder name
/app/cbf/CLSS/CSPAT104/decisions
-rw-r--r-- 1 xx XXX 128 Dec 24 13:23 CSPAT104_0712241323.decision
comand issued
[decisions]$ find . -mtime +1 -type f => doesn't retun the file name even though 24Hrs crosed
[decisions]$ find . -mtime 1 -type f => giving the actual
./CSPAT104_0712241323.decision

So why this one is happening ??? and is there any proper find command which i can apply in the script to get the expected results ???