Re: finding files modified yesterday

From: RANGI, JAI (JAI_RANGI@SDSTATE.EDU)
Date: Tue Dec 10 2002 - 10:00:22 EST


How about using this command

ls -l | grep "yesterday's date"

Example
ad117-11:/home # ls -l
total 314810
drwxr-xr-x 7 root root 168 Sep 12 18:14 .
drwxr-xr-x 19 root root 432 Dec 9 09:08 ..
-rw------- 1 root root 322048000 Oct 3 13:23 archive
drwxr-xr-x 13 501 users 1360 Dec 5 13:24 eprints
drwxr-xr-x 6 jai users 648 Dec 9 09:52 jai
drwxr-xr-x 11 jai users 1000 Aug 1 04:02 mettus
drwxr-xr-x 3 root root 208 Aug 29 15:09 temp

ad117-11:/home # ls -l | grep 'Dec 9' //NOTE: TAKE CARE
OF SPACES
drwxr-xr-x 19 root root 432 Dec 9 09:08 ..
drwxr-xr-x 6 jai users 648 Dec 9 09:52 jai
ad117-11:/home #

There were only two files of Dec 9
NOTE: Take care or spaces... Dec 10 has one space between "Dec" and
"10" while Dec 9 has two spaces between Dec and 9

Hope this helps

Jai Rangi
Unix System Administrator, Computing Services,
South Dakota State University
-------------------------------------------------------
In the world with no fences, why would you need Gates ?
                                          - Linux
-------------------------------------------------------

-----Original Message-----
From: IBM AIX Discussion List [mailto:aix-l@Princeton.EDU] On Behalf Of
Holger.VanKoll@SWISSCOM.COM
Sent: Tuesday, December 10, 2002 8:38 AM
To: aix-l@Princeton.EDU
Subject: finding files modified yesterday

Hello,
I need to find all files in /somewhere that have been modified
yesterday.
So far I use touch -t todays_date_0:00 /tmp/timestamp and find -new
/tmp/timestamp to find all files modified earlier than today.
How can I filter out the files modified 2,3,4... days before?
I should have a way that does not rely on certain TZ or LC* settings.
Regards,
Holger



This archive was generated by hypermail 2.1.7 : Wed Apr 09 2008 - 22:16:24 EDT