Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 18 Nov 1998 16:39:57 -0600
From:      Dan Nelson <dnelson@emsphone.com>
To:        gmarco@giovannelli.it, questions@FreeBSD.ORG
Cc:        newbie@FreeBSD.ORG
Subject:   Re: files newer than n days...
Message-ID:  <19981118163957.A17436@emsphone.com>
In-Reply-To: <199811182212.XAA05495@www.giovannelli.it>; from "Gianmarco Giovannelli" on Wed Nov 18 23:20:26 GMT 1998
References:  <199811182212.XAA05495@www.giovannelli.it>

next in thread | previous in thread | raw e-mail | index | archive | help
In the last episode (Nov 18), Gianmarco Giovannelli said:
> 
> Hello I'd like to find with "find" or in other way files newer than a
> given period, lets say 2 days for example... I tried with the ctime
> param of the find but it matches only files modified in the day
> specified (example -ctime 2, give me back all the files created on
> the day before yesterday but not the files created yesterday
> itself...) I can use -ctime 2 -or -ctime 1 as params of the find, but
> I like more a better solution....

According to the find manpage:

     All primaries which take a numeric argument allow the number to be
     preceded by a plus sign (``+'') or a minus sign (``-'').  A
     preceding plus sign means ``more than n'', a preceding minus sign
     means ``less than n'' and neither means ``exactly n'' .

So "find . -ctime -2" should work.
 
> Please aswer to me too, because I am not subscribed to this list.

This is standard operating procedure for the FreeBSD lists.

	-Dan Nelson
	dnelson@emsphone.com

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?19981118163957.A17436>