On Tuesday 20 Aug 2002 2:21 pm, cana rich wrote:
> Hello,
>     I would like to know how long (in days or month) a file exist on my
> machine. The aim of it is to archive files > 6 month for exemple. Is some
> one can help me?
> Thanks
> Canarich

How are you going to archive the files?  

If you can simply pass a list of file names, you could redirect the output of 
the 'find' command.  If you do 'man find' it will show you how you can 
specify a selection criteria.  You'll want something like:

find $mydir -ctime 183 |myarchiveprog

This will list all files inside the directory $mydir where the date last 
changed is >=183 days (six months) ago, and pass the list to myarchiveprog.

>
>
>
> ---------------------------------
> Yahoo! Mail -- Une adresse @yahoo.fr gratuite et en français !

-- 
Gary Stainburn
 
This email does not contain private or confidential material as it
may be snooped on by interested government parties for unknown
and undisclosed purposes - Regulation of Investigatory Powers Act, 2000     



-- 
redhat-list mailing list
unsubscribe mailto:[EMAIL PROTECTED]?subject=unsubscribe
https://listman.redhat.com/mailman/listinfo/redhat-list

Reply via email to