[ILUG] Find query

Justin MacCarthy macarthy at iol.ie
Tue Feb 12 13:22:03 GMT 2002


Here is what I did: 

(I created the folder and 3 files. )

macarthy at Shaftoe /c/testfiles

$ ls -la
total 34
drwxr-xr-x   2 macarthy None            0 Feb 12 12:37 .
drwxr-xr-x  62 macarthy None        28672 Feb 12 12:36 ..
-rw-r--r--   1 macarthy None         1393 Feb 12 12:36 test1.txt
-rw-r--r--   1 macarthy None         1393 Feb 12 12:37 test2.txt
-rw-r--r--   1 macarthy None         1393 Feb 12 12:37 test3.txt


(Touched the test1.txt )

macarthy at Shaftoe /c/testfiles 
$ touch -t 02111200 test1.txt

macarthy at Shaftoe /c/testfiles
$ ls -la
total 34
drwxr-xr-x   2 macarthy None            0 Feb 12 12:37 .
drwxr-xr-x  62 macarthy None        28672 Feb 12 12:36 ..
-rw-r--r--   1 macarthy None         1393 Feb 11 12:00 test1.txt
-rw-r--r--   1 macarthy None         1393 Feb 12 12:37 test2.txt
-rw-r--r--   1 macarthy None         1393 Feb 12 12:37 test3.txt

(Tried find command )

macarthy at Shaftoe /c/testfiles

$ find /c/testfiles/ -daystart -ctime -1
/c/testfiles/
/c/testfiles/test1.txt
/c/testfiles/test2.txt
/c/testfiles/test3.txt


Surely test1.txt shouldn't be listed ?? I am doing something stupid?

Justin 



> -----Original Message-----
> From: ilug-admin at linux.ie [mailto:ilug-admin at linux.ie]On Behalf Of
> Padraig Brady
> Sent: Tuesday, February 12, 2002 1:05 PM
> To: Justin MacCarthy
> Cc: ilug at linux.ie
> Subject: Re: [ILUG] Find query
> 
> 
> Justin MacCarthy wrote:
> > I want to get all files in a directory & it's subdirectories created
> > yesterday and add the to a bzip
> > 
> > I've tried
> > 
> >>find /mydir/ -startday -ctime -1
> >>
> > 
> > to list the files
> > 
> > What am I doing wrong ?
> > 
> > Thanks
> > 
> > Justin





More information about the ILUG mailing list