The UNIX and Linux Forums  


Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Dummies Questions & Answers
.
google unix.com




View Single Post in the UNIX and Linux Forums - Click on the Thread or Permalink to View Entire Thread -->
  #4 (permalink)  
Old 02-05-2008
ghostdog74 ghostdog74 is offline Forum Advisor  
Registered User
  
 

Join Date: Sep 2006
Posts: 2,555
Quote:
Originally Posted by bbilheimer View Post
Cool, thanks! So you use ls to list it in separate it lines then pipe it to wc to count those lines and print the total number.

That seems like such a hassle, though, there is no flag or something like that so that du or ls can simply show the total number of files in its output?
why do you think its a hassle? FWIW, you can just do it one time. save it as a shell library or function or shell script and you can reuse it next time. Its just a one time effort.