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
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
* 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 |
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
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 -
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
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
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
>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
> 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
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
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
12 matches
Mail list logo