reading a directory, first files the newest ones
- From: jordilin <jordilin@xxxxxxxxx>
- Date: Sun, 28 Oct 2007 01:10:04 -0000
When I read a huge directory with opendir,
opendir(DIR,"dirname");
my $file;
while($file=readdir(DIR))
whatever...
it loads the oldest ones first. I would like the newest files first,
instead of the oldest. Taking into account that I am only interested
in the newest files, this takes a lot of time, as the directory is
really huge. I am talking about thousands and thousands of files. I
need to process the files that are two hours old from now. I am not
interested in those older than two hours ago. I know that because I
check the modification time with stat.
any idea?
Thanks in advance
.
- Follow-Ups:
- Re: reading a directory, first files the newest ones
- From: Mark Clements
- Re: reading a directory, first files the newest ones
- From: Gunnar Hjalmarsson
- Re: reading a directory, first files the newest ones
- From: John W. Krahn
- Re: reading a directory, first files the newest ones
- From: Gunnar Hjalmarsson
- Re: reading a directory, first files the newest ones
- From: xhoster
- Re: reading a directory, first files the newest ones
- Prev by Date: FAQ 8.2 How come exec() doesn't return?
- Next by Date: Re: reading a directory, first files the newest ones
- Previous by thread: FAQ 8.2 How come exec() doesn't return?
- Next by thread: Re: reading a directory, first files the newest ones
- Index(es):
Relevant Pages
|
|