Return-Path: Delivered-To: apmail-perl-modperl-archive@www.apache.org Received: (qmail 47209 invoked from network); 2 Aug 2005 17:36:33 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 2 Aug 2005 17:36:33 -0000 Received: (qmail 24871 invoked by uid 500); 2 Aug 2005 17:36:03 -0000 Delivered-To: apmail-perl-modperl-archive@perl.apache.org Received: (qmail 24806 invoked by uid 500); 2 Aug 2005 17:36:02 -0000 Mailing-List: contact modperl-help@perl.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: List-Id: Delivered-To: mailing list modperl@perl.apache.org Received: (qmail 24748 invoked by uid 99); 2 Aug 2005 17:36:02 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 02 Aug 2005 10:36:02 -0700 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: domain of boysenberry@humaniteque.com designates 12.164.26.131 as permitted sender) Received: from [12.164.26.131] (HELO static.habitatlife.com) (12.164.26.131) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 02 Aug 2005 10:35:52 -0700 Received: from c-67-186-78-94.hsd1.il.comcast.net ([67.186.78.94] helo=[192.168.0.102]) by static.habitatlife.com with esmtpsa (TLSv1:RC4-SHA:128) (Exim 4.51) id 1E00gJ-0005Mw-MJ; Tue, 02 Aug 2005 13:35:59 -0400 In-Reply-To: References: <48f72ee01b1d041cbeaceb96cb0cb116@humaniteque.com> <42EE9E69.5000000@ectoplasm.org> <3f42ea1cb07c038dd03ae1da414b7663@humaniteque.com> Mime-Version: 1.0 (Apple Message framework v622) Content-Type: text/plain; charset=US-ASCII; format=flowed Message-Id: Content-Transfer-Encoding: 7bit Cc: Randy Kobes From: Boysenberry Payne Subject: Re: Trying to get File and Directory info off of external server quickly Date: Tue, 2 Aug 2005 12:35:56 -0500 To: mod_perl X-Mailer: Apple Mail (2.622) X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - static.habitatlife.com X-AntiAbuse: Original Domain - perl.apache.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - humaniteque.com X-Source: X-Source-Args: X-Source-Dir: X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N Thank You Everyone, I think now that I know I can use $ftp->ls( "-lR" ), which I couldn't find anywhere in the Net::FTP docs or other O'Reilly books I have, I can stick to Net::FTP without is being slow. What was causing my script to take so long was the multiple $ftp->cwd( $directory ), $ftp->ls() and $ftp->dir( $directory . $file ) calls for each directory in my directory loop. Now I use one cwd and ls("-lR") from my public html area then process the return array, which is a lot faster. It would be nice to be able to specify the directory as well as the "-lR" without using cwd( $directory ); does anyone know how to do it? Thanks for the tips on making my code more efficient too. Boysenberry This message contains information that is confidential and proprietary to Humaniteque and / or its affiliates. It is intended only for the recipient named and for the express purpose(s) described therein. Any other use is prohibited. http://www.habitatlife.com The World's Best Site Builder On Aug 1, 2005, at 6:28 PM, Randy Kobes wrote: > On Mon, 1 Aug 2005, Boysenberry Payne wrote: > >> I'm not sure if HEAD would work. >> Basically, I'm trying to read a directory's files. >> After I confirm a file exists and doesn't have zero >> size I check that it has the appropriate extension >> for the directory then I add the directory address, >> file name and extension to a table in our database. > > Can you get someone on the remote server to do a > cd top_level_directory > ls -lR > ls-lR # or find -fls find-ls > gzip ls-lR # or gzip find-ls > periodically, and then you can grab and parse ls-lR.gz or find-ls.gz? > > -- > best regards, > randy kobes > >