list files based on time change
Web Server forum
Back To The Forum Home!Search!Private Messaging System

Web Server Talk Web Server Talk > Unix and Linux reviews > Free Unix support > Unix Shell > list files based on time change




  Last Thread   Next Thread Next
  Show Printable Version Email this Page Subscribe to this Thread      Post New Thread    Post A Reply      

    list files based on time change  
tester


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
01-23-07 12:20 AM

Hi Gurus,
I want to search for all files/folders from root which are
changed/modified TODAY and generate a list of those in a file after say
9:00 AM ownwards. I tried  find it doesn't work for TODAY.
Any help is greatly appreciated.
Regards






[ Post a follow-up to this message ]



    Re: list files based on time change  
Bill Marcum


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
01-23-07 12:20 AM

On 22 Jan 2007 12:42:13 -0800, tester
<bshah@citadon.com> wrote:
>
>
> Hi Gurus,
> I want to search for all files/folders from root which are
> changed/modified TODAY and generate a list of those in a file after say
> 9:00 AM ownwards. I tried  find it doesn't work for TODAY.
> Any help is greatly appreciated.
> Regards
>
man touch
find -newer


--
Save the whales.  Collect the whole set.





[ Post a follow-up to this message ]



    Re: list files based on time change  
Michael Paoli


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
01-23-07 06:26 AM

Bill Marcum wrote:
> On 22 Jan 2007 12:42:13 -0800, tester
>   <bshah@citadon.com> wrote: 
> man touch
> find -newer

That will work for mtime, but the original post is a bit ambiguous.
Does the poster want files selected by mtime, or by ctime?  The mtime
(nominally the time of last modification) is user settable, and thus
doesn't necessarily actually reflect when a file was last changed.
The ctime, however is a timestamp of higher integrity.  It will be
updated when most anything about a file is changed, and also, if the
mtime or atime (time of last access) are explicitly set (they are
user settable) to anything other than defaulting to use of the
current time, that has the side effect of updating the ctime to the
current time.

Some find implementations, e.g. GNU find, also include -cnewer, which
works similar to -newer, except the ctime of the file find is
examining is compared to the mtime of a reference file (the argument
to the -cnewer option).  GNU find also has the option -daystart,
which could be quite handy.  PERL also has useful find capabilities.

See also: stat(2), utime(2), perl(1), File::Find (3perl)






[ Post a follow-up to this message ]



    Sponsored Links  




 





   All times are GMT. The time now is 01:36 AM.      Post New Thread    Post A Reply      
  Last Thread   Next Thread Next


Most Popular forums 

Forum Jump:
Rate This Thread:

Forum Rules:
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is OFF
vB code is ON
Smilies are ON
[IMG] code is OFF
 
Medical and Health forum | Computer Games Reviews | Graphics design forum

Back To The Top
Home | Usercp | Faq | Register