Re: ls lacking a feature?
- From: Bernard Liang <b_liang@xxxxxxxxxxxx>
- Date: Wed, 28 Jun 2006 14:50:29 -0700
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?
.
- Follow-Ups:
- Re: ls lacking a feature?
- From: Mark Triggs
- Re: ls lacking a feature?
- References:
- ls lacking a feature?
- From: Bernard Liang
- Re: ls lacking a feature?
- From: Phlip
- ls lacking a feature?
- Prev by Date: Re: ls lacking a feature?
- Next by Date: Re: Deleting substrings
- Previous by thread: Re: ls lacking a feature?
- Next by thread: Re: ls lacking a feature?
- Index(es):
Relevant Pages
|
|