Re: reading a directory, first files the newest ones
- From: "Jürgen Exner" <jurgenex@xxxxxxxxxxx>
- Date: Sun, 28 Oct 2007 02:04:46 GMT
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 areTo grab the files that are from two hours ago till now, I have to
interested in.
my @files = grep -M $_ <= 2/24, readdir DIR;
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
.
- Follow-Ups:
- Re: reading a directory, first files the newest ones
- From: jordilin
- 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
- 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
|