From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Paul Crittenden Newsgroups: gmane.os.tru64.managers Subject: SUMMARY:file count Date: Tue, 09 Jul 2002 12:08:52 -0500 Sender: tru64-unix-managers-owner@ornl.gov Message-ID: <5.1.0.14.0.20020709120421.00a0b840@storm.simpson.edu> NNTP-Posting-Host: localhost.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed X-Trace: main.gmane.org 1026235694 19917 127.0.0.1 (9 Jul 2002 17:28:14 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Tue, 9 Jul 2002 17:28:14 +0000 (UTC) Return-path: Original-Received: from sws1.ctd.ornl.gov ([160.91.20.101]) by main.gmane.org with smtp (Exim 3.33 #1 (Debian)) id 17Rymc-0005B7-00 for ; Tue, 09 Jul 2002 19:28:14 +0200 Original-Received: (qmail 22337 invoked by uid 5); 9 Jul 2002 17:08:54 -0000 Original-Followup-To: poster Precedence: bulk Original-Received: (qmail 22329 invoked from network); 9 Jul 2002 17:08:54 -0000 Original-Received: from unknown (HELO emroute1.cind.ornl.gov) (134.167.3.119) by 0 with SMTP; 9 Jul 2002 17:08:54 -0000 Original-Received: from emroute1.cind.ornl.gov (localhost [127.0.0.1]) by emroute1.cind.ornl.gov (PMDF V6.1-1 #39060) with ESMTP id <0GYZ007NKRMRYT@emroute1.cind.ornl.gov> for tru64-unix-managers@sws1.ctd.ornl.gov (ORCPT tru64-unix-managers@ornl.gov) ; Tue, 09 Jul 2002 13:08:54 -0400 (EDT) Original-Received: from storm.simpson.edu (storm.simpson.edu [198.206.243.1]) by emroute1.cind.ornl.gov (PMDF V6.1-1 #39060) with ESMTP id <0GYZ001BHRMMF7@emroute1.cind.ornl.gov> for tru64-unix-managers@sws1.ctd.ornl.gov (ORCPT tru64-unix-managers@ornl.gov) ; Tue, 09 Jul 2002 13:08:47 -0400 (EDT) Original-Received: from pc198a.storm.simpson.edu (pc198a.simpson.edu [198.206.243.198]) by storm.simpson.edu (8.11.4/8.11.4) with ESMTP id g69H94r212581 for ; Tue, 09 Jul 2002 12:09:04 -0500 (CDT) X-Sender: crittend@storm.simpson.edu Original-To: tru64-unix-managers@ornl.gov X-Mailer: QUALCOMM Windows Eudora Version 5.1 Xref: main.gmane.org gmane.os.tru64.managers:906 X-Report-Spam: http://spam.gmane.org/gmane.os.tru64.managers:906 Wow, I got around 30 replies in 10 minutes. What a great list. The answer is: ls -l|wc -l The ls -l lsits the files and the wc -l count the number of lines listed. You can use ls -R|wc -l to list all and count all sub directories. find . -type f | wc -l was also suggested but I used the first one. Thanks to all. Original Question: >Is there any way to get a count on the number of files in a directory? I have >checked the archives and found nothing to help me. Paul Crittenden Computer System Manager Simpson College email: crittend@simpson.edu Phone: (515)961-1680 "You don't have to attend every argument you're invited to."