Re: ls lacking a feature?



list all the directories in the cur direc

for ex, if ls -F lists

a b/ c/ d e f/

then i want a command that will give me
$ [some command]
b c f
or
b/ c/ f/

i.e. just the directories. i know how to do it in a shell script using complicated constructions like

for i in `find -type d`
do
if [ -d $i ]
...
done

but this seems too complicated. shouldnt' there be a one-liner to list all the directories?

-BL

Phlip wrote:

Bernard Liang wrote:


how does one perform the equivalent MS-DOS's "dir /a:d" (directory
listing) in *ix (say, linux)?


Assuming you mean Bash, what does dir /a:d do?


.



Relevant Pages

  • Majordomo results: Re: Here
    ... Command 'this' not recognized. ... This is version 1.94.4 of Majordomo. ... To get a list of publicly-available mailing lists on this system, ... that an authorization key is required for subscription. ...
    (comp.lang.python)
  • Majordomo results: Re: Approved
    ... Command 'this' not recognized. ... This is version 1.94.4 of Majordomo. ... To get a list of publicly-available mailing lists on this system, ... that an authorization key is required for subscription. ...
    (comp.lang.python)
  • Majordomo results: [PMX:VIRUS] Re: Proof of concept
    ... Command 'this' not recognized. ... This is version 1.94.5 of Majordomo. ... To get a list of publicly-available mailing lists on this system, ... that an authorization key is required for subscription. ...
    (comp.lang.python)
  • Majordomo results: Look,my beautiful girl friend
    ... Command '<iframe' not recognized. ... This is version 1.94.3 of Majordomo. ... Once you've determined that you wish to subscribe to one or more lists on ... may simply send the command "unsubscribe" followed by the list name: ...
    (Debian-User)
  • Re: Get me out of bad Windows habits, please!
    ... Instead of specific lists of things, I was hoping for a more ... >> If I have a sound driver failure in Windows, ... >> Generally in Linux, instead of rebooting, we check X, Y and Z and use ... > Universal Command Guide for Operating Systems ...
    (alt.os.linux.suse)