Red Hat Topics - find command - mtime/ctime calc

This is Interesting: Free IT Magazines  
Home > Archive > Red Hat Topics > June 2006 > find command - mtime/ctime calc





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author find command - mtime/ctime calc
sf1

2006-06-02, 1: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.

sf1

2006-06-02, 1: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.

Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com