Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.
scan said:
"dude" if you read any of my earlier posts I DO USE THE MAN PAGES.

if i'm asking for help, beleive me, i've already looked there. I also googled for help too. I'm not looking for any kind of easy way out since i'm trying to learn this stuff. you don't want to help, dont' bother posting.

I can list the subdirectories and files but I think what I want is just the subdirectories, which I don't know how to do.

fair enough my bad...atleast specify your anwser..not just "what is A?" that looks kinda dumb..."what is a when x=b?" something i dont know...you cant really expect me "maybe im cynical...hell if i knew..." to be patient, but when i just see a questien with simple and no dedication just asking "what is a?" kinda questien i would like to smack a big fat *nix book in their faces


anyways...my apologies again i guess i misjudged you...and to be honest i dont know the anwser your seeking, havent used any unix box since AGES...so good luck in finding your anwser or get some kind soul "unlike me, i know im sometimes...well bitchy" to help ya out

ciao
fisty
 
scan said:
How can I use "find" command to list the subdirectories of a directory??
man pages only get you so far, because they list all the switches and details but give little overview of when to use what, and only a few examples (if you are lucky). Find is a good example of that. The man page documents it, but usually leaves beginners baffled.

The find command is usually used to search a directory and its subdirectories for "things" that match certain conditions and then do something with each such thing.

Here is a find command to list all subdirectories under the current directory:

Code:
find . -type d -print
Explanation of the command arguments:

. is the starting directory, where period means the current directory. It could be a directory path too, such as /Users/myname/movies.

-type d means to test for directories. In contrast, -type f would mean to test for plain files and not match directories.

-print means print (display) the filename of any matches you get

Remember to "cd" to the directory in question before using the "find ." form. Otherwise, specify a real directory path instead of ".".
 
thanks a lot for understanding (and the command).

Doctor Q said:
man pages only get you so far, because they list all the switches and details but give little overview of when to use what, and only a few examples (if you are lucky). Find is a good example of that. The man page documents it, but usually leaves beginners baffled.

The find command is usually used to search a directory and its subdirectories for "things" that match certain conditions and then do something with each such thing.

Here is a find command to list all subdirectories under the current directory:

Code:
find . -type d -print
Explanation of the command arguments:

. is the starting directory, where period means the current directory. It could be a directory path too, such as /Users/myname/movies.

-type d means to test for directories. In contrast, -type f would mean to test for plain files and not match directories.

-print means print (display) the filename of any matches you get

Remember to "cd" to the directory in question before using the "find ." form. Otherwise, specify a real directory path instead of ".".
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.