[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: quick howto-command questions?



Hi Ethan,



    Ahh-ha. Thank You for the info.



Jim Richards





On 20 Mar 2001 01:38:56 -0900, Ethan Benson wrote:
> On Tue, Mar 20, 2001 at 03:21:22AM -0700, Jimmy Richards wrote:
> > Hi John,
> > 
> > 
> >     I think i know some of these....
> > 
> > 
> >     1)   ls -a > filecount && wc -l filecount
> 
> or ls -a | wc -l
> 
> >     2)   find /<your_dir> -perm 0755 -print > exec_count && wc -l
> >     exec_count      (i think this'll work.. I didn't try it.   man find
> >     for more info)
> 
> more reliable would be:
> 
> find /<your_dir> -perm +0111 -print | wc -l
> 
> this will find any file with any execute bit set, your example will
> not catch files which are mode 750, 700, 500, 550, 555, etc etc.  
> 
> >     3)   ls *.tar.gz > tar.gz_count && wc -l tar.gz_count
> 
> ls *.tar.gz | wc -l
> 
> -- 
> Ethan Benson
> http://www.alaska.net/~erbenson/



Reply to: