Re: reading a directory, first files the newest ones
- From: jordilin <jordilin@xxxxxxxxx>
- Date: Sun, 28 Oct 2007 02:31:35 -0000
On Oct 28, 2:04 am, "Jürgen Exner" <jurge...@xxxxxxxxxxx> wrote:
jordilin wrote:
On Oct 28, 1:36 am, Gunnar Hjalmarsson <nore...@xxxxxxxxx> wrote:
You may want to use grep() to assign to an array the files you are
interested in.
my @files = grep -M $_ <= 2/24, readdir DIR;
To grab the files that are from two hours ago till now, I have to
process each file to check the modification time.
Yes. That is what the -M does.
Obviously, if the
while checks the oldest files first, it can take more than 10 minutes
to arrive for those files I am interested in.
That is exactly why Gunnar suggest not to use a while() loop but grep() in
the first place.
jue
Yeah, it seems that this would be a solution.
.
- Follow-Ups:
- Re: reading a directory, first files the newest ones
- From: Juha Laiho
- Re: reading a directory, first files the newest ones
- References:
- reading a directory, first files the newest ones
- From: jordilin
- Re: reading a directory, first files the newest ones
- From: Gunnar Hjalmarsson
- Re: reading a directory, first files the newest ones
- From: jordilin
- Re: reading a directory, first files the newest ones
- From: Jürgen Exner
- reading a directory, first files the newest ones
- Prev by Date: Re: reading a directory, first files the newest ones
- Next by Date: Re: reading a directory, first files the newest ones
- Previous by thread: Re: reading a directory, first files the newest ones
- Next by thread: Re: reading a directory, first files the newest ones
- Index(es):
Relevant Pages
|