Re: listing number of directories only

2004-11-03 Thread Robert Vangel
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]

Re: listing number of directories only

2004-11-03 Thread Jason Rennie
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]

Re: listing number of directories only

2004-11-03 Thread Petrov M.I.
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]

Re: listing number of directories only

2004-11-03 Thread Cameron Hutchison
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

listing number of directories only

2004-11-03 Thread Lance Hoffmeyer
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