[SunRescue] Ok...newbie question...
Jody Stephens
rescue at sunhelp.org
Thu Dec 7 15:50:18 CST 2000
On Thu, 7 Dec 2000, Mike Hebel 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?
ls -A /storage | wc -l would give you an approximation (still counting
directorys (if you have subdirs)). If need be you can either use gnu ls
ability to ignore based on a shell pattern or write a quick perl script.
You could also look at a ls -l of the dir.
drwx------ 3 jodys staff 4096 Jul 18 12:10 .xauth
^ minus two gives you number of links in that dir
(files/directorys).
(correct me if I'm wrong about the above)
Good luck.
>
> 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
>
More information about the rescue
mailing list