On 6/25/2018 4:22 PM, Rich Shepard wrote:
Steve,
I interpreted the man page as using the -d option to list only
subdirectories of the cwd.
Why would ls have an option to tell you you're in the current working
directory?
I agree that -d by itself is next to useless, but it's helpful with
wildcards.
To list the names of files and directories beginning with, say, the
letter "a"
ls -d a*
The -d prevents the command from listing directories' contents instead
of their names.
What option would you use to list only subdirectories and not files
in the
cwd or the subdirectories?
I don't know if ls will do that without some kind of filter.
I usually do something like
find * -type d -prune
The -prune prevents recursion all the way down the directory tree.
Rich
_______________________________________________
PLUG mailing list
[email protected]
http://lists.pdxlinux.org/mailman/listinfo/plug
_______________________________________________
PLUG mailing list
[email protected]
http://lists.pdxlinux.org/mailman/listinfo/plug