Re: Unix 101: ls with file count

2002-06-25 Thread Damian Sweeney
Kent West wrote: > Wienand Ian wrote: > >>> Chain commands in an alias: >>> alias dols="ls; echo `ls -l | grep ^d | wc -l` directories; echo `ls >>> -l | >>> >> >> grep ^- | wc -l` files" >> >> >>> customize as needed >>> >> >> >> If you're wondering why you copied and pasted this in it didn't wo

Re: Unix 101: ls with file count

2002-06-25 Thread Kent West
Vineet Kumar wrote: alias dolsa='ls -la --color | more ; echo ---; echo `ls -la | grep ^d | wc -l` Directories; echo `ls -la | grep ^- | wc -l` "File(s)" ; echo `ls -la | grep ^l | wc -l` "Symbolic Link(s)"; echo 1 Byte Count ; echo `ls -la | wc -l` Total Items' Glad you

Re: Unix 101: ls with file count

2002-06-25 Thread Vineet Kumar
* Kent West ([EMAIL PROTECTED]) [020625 05:51]: > Here's my alias, which I believe works like I want it to: > > > alias dolsa='ls -la --color | more ; echo ---; echo `ls > -la | grep ^d | wc -l` Directories; echo `ls -la | grep ^- | wc -l` > "File(s)" ; echo `ls -la | grep ^l |

Re: Unix 101: ls with file count

2002-06-25 Thread Kent West
Here's my alias, which I believe works like I want it to: alias dolsa='ls -la --color | more ; echo ---; echo `ls -la | grep ^d | wc -l` Directories; echo `ls -la | grep ^- | wc -l` "File(s)" ; echo `ls -la | grep ^l | wc -l` "Symbolic Link(s)"; echo 1 Byte Count ; echo `ls -l

Re: Unix 101: ls with file count

2002-06-25 Thread Gary Turner
On Tue, 25 Jun 2002 00:24:23 -0500, Kent West wrote: >Wienand Ian wrote: >Actually, it worked just fine when I copied/pasted it. I'm using bash. >As you suggested, I replaced the double-quotes with singles, and it >works the same. Or it appears to at least. > >However, when I added ";ls | wc -

Re: Unix 101: ls with file count

2002-06-25 Thread Travis Crump
Kent West wrote: However, when I added ";ls | wc -l` Total Files'" to the end, I get a count of 16 directories, 8 files, and 25 Total Items. Something's not adding up. D'oh! I added "ls -l" instead of "ls". When I fixed that, the count dropped back down to 24. Kent For me, echo `ls -l

Re: Unix 101: ls with file count

2002-06-25 Thread Kent West
However, when I added ";ls | wc -l` Total Files'" to the end, I get a count of 16 directories, 8 files, and 25 Total Items. Something's not adding up. D'oh! I added "ls -l" instead of "ls". When I fixed that, the count dropped back down to 24. Kent -- To UNSUBSCRIBE, email to [EMAIL PRO

Re: Unix 101: ls with file count

2002-06-25 Thread Kent West
Wienand Ian wrote: Chain commands in an alias: alias dols="ls; echo `ls -l | grep ^d | wc -l` directories; echo `ls -l | grep ^- | wc -l` files" customize as needed If you're wondering why you copied and pasted this in it didn't work but just constantly showed you the stats for

RE: Unix 101: ls with file count

2002-06-24 Thread Wienand Ian
>Chain commands in an alias: >alias dols="ls; echo `ls -l | grep ^d | wc -l` directories; echo `ls -l | grep ^- | wc -l` files" >customize as needed If you're wondering why you copied and pasted this in it didn't work but just constantly showed you the stats for the directory you were in when you

Re: Unix 101: ls with file count

2002-06-24 Thread Robert L. Harris
> To: Debian-User List > Subject: Unix 101: ls with file count > X-Mailing-List: archive/latest/218576 > > Okay, back to Unix 101 for me. > > How do I produce a directory listing followed by a count of files and > directories? > > ls | wc > > only

Re: Unix 101: ls with file count

2002-06-24 Thread Chris Kenrick
On Mon, Jun 24, 2002 at 10:41:48PM -0500, Kent West wrote: > Okay, back to Unix 101 for me. > > How do I produce a directory listing followed by a count of files and > directories? > > ls | wc > > only produces a count without listing the files, and it doesn't > distinguish between files and d

Unix 101: ls with file count

2002-06-24 Thread Kent West
Okay, back to Unix 101 for me. How do I produce a directory listing followed by a count of files and directories? ls | wc only produces a count without listing the files, and it doesn't distinguish between files and directories. What I'd like is something like this: westk03[westk]:/home/w