Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Mailing Lists -> Oracle-L -> Re: find 2 days ago date in Solaris

Re: find 2 days ago date in Solaris

From: James Foronda <James.Foronda_at_Sun.COM>
Date: Mon, 08 May 2006 17:42:34 -0400
Message-id: <445FBB4A.4060407@sun.com>


Vikram,

vikram singh wrote:
> Hello all,
> how can i find 2 days ago date in Solaris?
>
> I want to find all the trace files that were generated two days
> ago, and only two days ago. not 'in the last two days', but files
> generated only two days ago. Can anyone help me out?
>
> i am using SunOS 5.8.
>
> Any help is thankful.
>
>

I have 4 files dated May 1, 2, 3, & 4.
jforonda_at_rapanui$ ls -l
total 0

-rw-r--r--   1 jforonda staff          0 May  1 01:00 may01.trc
-rw-r--r--   1 jforonda staff          0 May  2 01:00 may02.trc
-rw-r--r--   1 jforonda staff          0 May  3 01:00 may03.trc
-rw-r--r--   1 jforonda staff          0 May  4 01:00 may04.trc

Today is May 8:

jforonda_at_rapanui$ date
Mon May 8 17:35:48 EDT 2006

I want to see files that were last modified five days ago:

jforonda_at_rapanui$ find . -type f -mtime 5 ./may03.trc

Is that what you are looking for?

I'm using OpenSolaris but it should work in Solaris 8 as well.

HTH, James

--
http://www.freelists.org/webpage/oracle-l
Received on Mon May 08 2006 - 16:42:34 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US