use of find
am 06.11.2007 00:17:01 von zmasood
Hi All,
I want to be able to find from a directory, all files that do NOT have
a ".gz" file extension and also are more than 1 day old.
The idea is to zip the resultant files.
Thanks in Advance
Re: use of find
am 06.11.2007 04:09:21 von wayne
zmasood@gmail.com wrote:
> Hi All,
>
> I want to be able to find from a directory, all files that do NOT have
> a ".gz" file extension and also are more than 1 day old.
>
> The idea is to zip the resultant files.
>
>
> Thanks in Advance
>
See if my "find" tutorial meets your needs:
http://www.hccfl.edu/pollock/Unix/FindCmd.htm
-Wayne
Re: use of find
am 06.11.2007 05:51:14 von ramesh.thangamani
On Nov 6, 8:09 am, Wayne wrote:
> zmas...@gmail.com wrote:
> > Hi All,
>
> > I want to be able to find from a directory, all files that do NOT have
> > a ".gz" file extension and also are more than 1 day old.
>
> > The idea is to zip the resultant files.
>
> > Thanks in Advance
>
> See if my "find" tutorial meets your needs:
>
> http://www.hccfl.edu/pollock/Unix/FindCmd.htm
>
> -Wayne
find . -name "*.gz" -ctime -1
-ctime option is for last file status change time. You can use -mtime
option for last modified time and -atime for the last accessed time
Re: use of find
am 06.11.2007 10:17:35 von Cyrus Kriticos
rthangam wrote:
> Wayne wrote:
>> zmas...@gmail.com wrote:
>>>
>>> [...] find [...] all files that do NOT have
>>> a ".gz" file extension and also are more than 1 day old.
>
> find . -name "*.gz" -ctime -1
find . ! -name "*.gz" -ctime -1
--
Best regards | Be nice to America or they'll bring democracy to
Cyrus | your country.
Re: use of find
am 06.11.2007 10:30:09 von ramesh.thangamani
On Nov 6, 2:17 pm, Cyrus Kriticos
wrote:
> rthangam wrote:
> > Wayne wrote:
> >> zmas...@gmail.com wrote:
>
> >>> [...] find [...] all files that do NOT have
> >>> a ".gz" file extension and also are more than 1 day old.
>
> > find . -name "*.gz" -ctime -1
>
> find . ! -name "*.gz" -ctime -1
>
> --
> Best regards | Be nice to America or they'll bring democracy to
> Cyrus | your country.
Thanks Cyrus for correcting me :).