Re: Can ls list subdirectories only?



On 2007-08-05, Stephane CHAZELAS <this.address@xxxxxxxxxx> wrote:

I would like to get a listing of subdirectories only, without the
files, in a
[...]
ls -- */.
[...]
1. I'm not the OP, I don't want anything.

2. Yes he did, see above "subdirectories only, without the files"
[...]

Well,

when you do

ls *

You list both the files in the current directory and the content
of all the subdirectories.

With

ls -- */

You list only the content of the subdirectories, that's how I
understood the OP's requirement.

So did I. But I merely pointed out that I tried your suggestion, and it
didn't work here. I get subdirs *with* their files.

I'm using SUSE 10.0 in text mode.


--
There is an art, it says, or rather, a knack to flying.
The knack lies in learning how to throw yourself at the ground and miss.
Douglas Adams
.



Relevant Pages

  • Re: How do I find file "findme" in tree "bigtree" searching only subdirectories named "in_here"?
    ... subdirectories named "in_here"? ... I've been pulling my hair out for an hour or so trying to figure out ... how to do this with the find command. ... The knack lies in learning how to throw yourself at the ground and miss. ...
    (comp.unix.shell)
  • Re: Can ls list subdirectories only?
    ... ls lists what you tell it to list. ... Yes he did, see above "subdirectories only, without the files" ... The knack lies in learning how to throw yourself at the ground and miss. ... Douglas Adams ...
    (comp.unix.shell)
  • Re: Can ls list subdirectories only?
    ... ls lists what you tell it to list. ... The shell will tell ls to list the subdirectories (except for ... The knack lies in learning how to throw yourself at the ground and miss. ... Douglas Adams ...
    (comp.unix.shell)
  • Re: Viewing Files between two Specific Dates
    ... How can i display all the ... The knack lies in learning how to throw yourself at the ground and miss. ... Douglas Adams ...
    (comp.unix.shell)
  • Re: HP drivers for SUSE
    ... Th HP Management tools shouldn't even be installed under Windows. ... The knack lies in learning how to throw yourself at the ground and miss. ... Douglas Adams ...
    (alt.os.linux.suse)