script to find altered files (actually only using find)

script to find altered files (actually only using find)

Post by Phil » Sat, 27 Jan 2001 21:59:31



Hello all:
I am new to shell scripting. I know there is a way I can do this, I need to
figure out how to use -find- or use a shell script to tell me which files
have been altered by date.
My deal is I don't know where to address the time. Is there a timestamp in
the inode when a file is altered, how can I find this out.
basically I want to:
find <all files> that have been altered since <date>
Any help is greatly appreciated, and yes I am going to get a shell
programming book today.
Thanks,
Phil
 
 
 

script to find altered files (actually only using find)

Post by Maurizio Loret » Sat, 27 Jan 2001 23:31:38



> Hello all:
> I am new to shell scripting. I know there is a way I can do this, I need to
> figure out how to use -find- or use a shell script to tell me which files
> have been altered by date.
> My deal is I don't know where to address the time. Is there a timestamp in
> the inode when a file is altered, how can I find this out.
> basically I want to:
> find <all files> that have been altered since <date>
> Any help is greatly appreciated, and yes I am going to get a shell
> programming book today.
> Thanks,
> Phil

man find will tell you:

        -mtime n
                  Select files last modified n*24 hours ago

Additionally, the man page tells that"n" means "exactly n days ago";
"+n" means "more than n days ago; and "-n" means "less than n days
ago".

man is your friend.

--
Maurizio Loreti                         http://www.pd.infn.it/~loreti/mlo.html