Re: how can I use "find" command to locate new created file in a certain directory?? On Jul 31, 11:48 pm, Michael Vilain <vil...@spamcop.net> wrote:
> In article <1185895309.380747.289...@r34g2000hsd.googlegroups .com>,
>
> move1000 <move1...@gmail.com> wrote:
> > I need to create a script to collect all new created files in a
> > directory, "find" command in Solaris 9 only has option for mtime,
> > atime, ctime...
>
> > Help please.
>
> Since the UNIX filesystem doesn't track "create time", you're left with
> a big problem. Either track the file creation yourself inside your
> application or write your own variant of UFS which will track file
> creation time or switch to MacOS X which does this.
>
> --
> DeeDee, don't press that button! DeeDee! NO! Dee...
Hi,
As stated above you cannot find the creation date. However using find
command you can sort out the files depending on their access date and /
or modification/change date.
syntax would be as below
find <the path of the directory to search for the file>/* -atime -30
-atime is access time
- 30 indicates all the files accessed within 30 days from today
Incase you want to sort file depending on modification date
find <the path of the directory to search for the files>/* -ctime -30
ctime is for changed time
I hope this useful for you.
Thanks
Anuj |