[SunRescue] Ok...newbie question...

Mike Hebel rescue at sunhelp.org
Thu Dec 7 15:56:00 CST 2000


Thanks!

(More than my money's worth! ;-)

Mike

-----Original Message-----
From: rescue-admin at sunhelp.org [mailto:rescue-admin at sunhelp.org]On
Behalf Of Paul Theodoropoulos
Sent: Thursday, December 07, 2000 3:44 PM
To: rescue at sunhelp.org
Subject: Re: [SunRescue] Ok...newbie question...



ls -1 | wc -l

or if you're lazy like me, just

ls|wc

the second value printed in this latter form is the total number of files
and directories.

if there are subdirectories and you want to count the contents of those -

ls -R |wc

but that will include the subdirectory names in the output. for a more
precise total count -

find . -type f -print|wc

will list all files, including files in subdirs, but won't count the
directory entries themselves.


At 01:01 PM 12/07/2000, you wrote:
>How do you get the number of files in a given directory?  I can get the
>total size, individual size, date, time, etc. but not how many files there
>are.  Does this show up anywhere easily?
>
>What I need this for is I need to justify why we need to purchase another
>Solaris workstation and the CAD software to go with it.  I need to know how
>many of the CAD files are in the /storage directory on the server.  (They
>would like me to start moving engineers to NT but I'm not willing to do
that
>yet - the NT version of the same CAD software, ExpertCAD, is not up to
snuff
>AFAIC.)
>
>Anybody?
>
>Thanks in advance!
>
>Mike Hebel
>
>_______________________________________________
>Rescue maillist  -  Rescue at sunhelp.org
>http://www.sunhelp.org/mailman/listinfo/rescue

---------------------------------
Paul Theodoropoulos
paul at atgi.net paul at anastrophe.com
Senior Unix Systems Administrator
Advanced Telcom Group, Inc.
Santa Rosa, California
Work: http://www.callatg.com
Play: http://www.anastrophe.com
Downtime Is Not An Option

_______________________________________________
Rescue maillist  -  Rescue at sunhelp.org
http://www.sunhelp.org/mailman/listinfo/rescue




More information about the rescue mailing list