|
|
|
|
||||||
| comp.unix.shell Using and programming the Unix shell. |
![]() |
|
|
LinkBack | Outils de la discussion |
|
|
#1 |
|
Messages: n/a
Hébergeur: |
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 |
|
|
|
#2 |
|
Messages: n/a
Hébergeur: |
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 |
|
|
|
#3 |
|
Messages: n/a
Hébergeur: |
On Nov 6, 8:09 am, Wayne <nos...@all4me.invalid> 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 |
|
|
|
#4 |
|
Messages: n/a
Hébergeur: |
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. |
|
|
|
#5 |
|
Messages: n/a
Hébergeur: |
On Nov 6, 2:17 pm, Cyrus Kriticos <cyrus.kriti...@googlemail.com>
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 . |
|
![]() |
| Outils de la discussion | |
|
|