From: Luciano Moreira - igLnx <lucianolnx@ig.com.br>
To: linux-c-programming@vger.kernel.org
Subject: Implementing a file counter (like "ls | wc")
Date: Wed, 07 Apr 2004 11:27:02 -0300 [thread overview]
Message-ID: <40740FB6.9020805@ig.com.br> (raw)
We implemented a program that use "opendir()", "readdir()", and
"closedir()" to scan a directory and count the files contained into it.
But, it program have taking more time than "ls | wc" to count files.
Does have any other way to count files faster?
PS: Our program needs sometime to filter files by extension (like: *.c,
*.cpp, and so on. Thus we use strcmp() to compare last letters of both
strings).
Luciano
next reply other threads:[~2004-04-07 14:27 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-04-07 14:27 Luciano Moreira - igLnx [this message]
-- strict thread matches above, loose matches on Subject: below --
2004-04-07 14:35 Implementing a file counter (like "ls | wc") Alphex K.
2004-04-07 14:47 ` Luciano Moreira - igLnx
2004-04-07 15:34 ` Holger Kiehl
2004-04-13 12:52 ` Steven Smith
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=40740FB6.9020805@ig.com.br \
--to=lucianolnx@ig.com.br \
--cc=linux-c-programming@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).