[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [ProgSoc] Listing directories
On Sun, Nov 11, 2007 at 03:15:16AM +1100, John Elliot wrote:
> I'm trying to figure out how to use 'ls' to list only the directories in
> the current directory, but I can't figure it out. :P
>
> On Windows the equivalent command would be: dir /ad
>
> Can someone throw me a bone?
>
Off the top of my head...
Just the directory names:
find . -maxdepth 1 -mindepth 1 -type d
Just the directory names, no preceding path:
find . -maxdepth 1 -mindepth 1 -type d -printf "%f\n"
Directory names, with details:
ls -l | grep '^d'
HTH HAND
- Rob
-
You are subscribed to the progsoc mailing list. To unsubscribe, send a
message containing "unsubscribe" to progsoc-request@xxxxxxxxxxxxxxxxxxx
If you are having trouble, ask owner-progsoc@xxxxxxxxxxxxxxxxxx for help.