ls */ -d|wc -l
works too
Petrov M.I. wrote:
Hi.
May be `ls -F | grep "^.*/$"' ?
--
"Change your thoughts and you change your world."
--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]
On Thu, Nov 04, 2004 at 08:33:41AM +1100, Cameron Hutchison wrote:
> $ find -maxdepth 1 -type d ! -name '.*' | cat -n
Another variation:
find * -type d -maxdepth 0
Jason
--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]
Hi.
May be `ls -F | grep "^.*/$"' ?
--
"Change your thoughts and you change your world."
--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]
Once upon a time Lance Hoffmeyer said...
>
> find -maxdepth 1 -type d | cat -n
>
> but these two methods list all the hidden directories as well,
> .news, .mozilla ...
>
> I tried du --max-depth=1 --exclude '\.*' but it excluded everything
> (Guess it treated it as .*).
>
> How can I list only
OK, so one way to list number of files in a directory is:
ls | cat -n
one can list the number of subdirectories by
du --max-depth=1 | cat -n
or
find -maxdepth 1 -type d | cat -n
but these two methods list all the hidden directories as well,
.news, .mozilla ...
I tried du --max-depth=1 --ex
5 matches
Mail list logo