find command - mtime/ctime calc
Web Server forum
Back To The Forum Home!Search!Private Messaging System

Web Server Talk Web Server Talk > Unix and Linux reviews > Red Hat support > Red Hat Topics > find command - mtime/ctime calc




  Last Thread   Next Thread Next
  Show Printable Version Email this Page Subscribe to this Thread      Post New Thread    Post A Reply      

    find command - mtime/ctime calc  
sf1


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
06-02-06 06:12 PM

Hi,
i got this problem, suppose these files :

$ cd /oraarc
$ ls -lgo
May 29 19:08 20060529190001.expfull.ahd.log
May 29 19:08 20060529190001.expfull.ahd.Z
May 30 12:06 20060530120001.expfull.ahd.log
May 30 12:06 20060530120001.expfull.ahd.Z
May 30 19:23 20060530190001.expfull.ahd.log
May 30 19:23 20060530190001.expfull.ahd.Z
May 31 12:23 20060531120001.expfull.ahd.log
May 31 19:15 20060531190001.expfull.ahd.log
Jun  1 12:23 20060601120002.expfull.ahd.log
Jun  1 12:23 20060601120002.expfull.ahd.Z
Jun  1 19:23 20060601190001.expfull.ahd.log

now is Fri Jun  2 10:46:12 BRT 2006 and i do a couple of find commands
:
$ find /oraarc -name "*expfull*" -mtime +2 -exec ls -lgo {} \;
-rw-r--r--  1 63264 May 29 19:08 /oraarc/20060529190001.expfull.ahd.log
-rw-r--r--  1 1208430592 May 29 19:08
/oraarc/20060529190001.expfull.ahd.Z
$ find /oraarc -name "*expfull*" -ctime +2 -exec ls -lgo {} \;
find: /oraarc/lost+found: Permission denied
-rw-r--r--  1 63264 May 29 19:08 /oraarc/20060529190001.expfull.ahd.log
-rw-r--r--  1 1208430592 May 29 19:08
/oraarc/20060529190001.expfull.ahd.Z

the questions are :
* why files from Jun,30 are not catched by the commands ?
* what am i doing wrong, if so ?

thanks,
Sandro.






[ Post a follow-up to this message ]



    Re: find command - mtime/ctime calc  
sf1


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
06-02-06 06:12 PM

look that , cmin / mmin works better :

$ find /oraarc -name "*expfull*" -mmin +2880
find: /oraarc/lost+found: Permission denied
/oraarc/20060529190001.expfull.ahd.log
/oraarc/20060529190001.expfull.ahd.Z
/oraarc/20060530120001.expfull.ahd.log
/oraarc/20060530120001.expfull.ahd.Z
/oraarc/20060530190001.expfull.ahd.log
/oraarc/20060530190001.expfull.ahd.Z
$ find /oraarc -name "*expfull*" -cmin +2880
find: /oraarc/lost+found: Permission denied
/oraarc/20060529190001.expfull.ahd.log
/oraarc/20060529190001.expfull.ahd.Z
/oraarc/20060530120001.expfull.ahd.log
/oraarc/20060530120001.expfull.ahd.Z
/oraarc/20060530190001.expfull.ahd.log
/oraarc/20060530190001.expfull.ahd.Z

it seems that mtime / ctime is doing something wrong with the hours.






[ Post a follow-up to this message ]



    Sponsored Links  




 





   All times are GMT. The time now is 11:18 AM.      Post New Thread    Post A Reply      
  Last Thread   Next Thread Next


Most Popular forums 

Forum Jump:
Rate This Thread:

Forum Rules:
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is OFF
vB code is ON
Smilies are ON
[IMG] code is OFF
 
Medical and Health forum | Computer Games Reviews | Graphics design forum

Back To The Top
Home | Usercp | Faq | Register