Re: ls lacking a feature?
- From: Roberto Waltman <usenet@xxxxxxxxxxxx>
- Date: Thu, 29 Jun 2006 09:39:05 -0400
Bernard Liang <b_liang@xxxxxxxxxxxx> wrote:
Well,
ls -l | grep ^d | tr -s ' ' | cut -d' ' -f9
seems to do the trick for me, but this is a very cheap hack, and is
dependent on what fields ls decides to print. I am definitely not
convinced this is the best method, but unfortunately this is the
simplest one I know that works.
-BL
Richard Heathfield wrote:
Bernard Liang said:
how does one perform the equivalent MS-DOS's "dir /a:d" (directory
listing) in *ix (say, linux)?
I use:
ls -al | grep ^d
but there's probably an easier way. :-)
From my .bashrc :
alias lsd='ls -F | grep / | tr -d /'
alias lsx='ls -F | grep "*" | tr -d "*"'
alias lsl='ls -F | grep @ | tr -d @'
Yes, ls is lacking several features. The one I need the most is the
ability to choose exactly what information to display and in what
order. For example ls --date --owner, instead of ls -l piped into cut,
etc.
(Going off topic to the recent thread in comp.lang.c about
verification tools. I keep reading the subject line as "is lacking a
feature")
Roberto Waltman
.
- Follow-Ups:
- Re: ls lacking a feature?
- From: Steve O'Hara-Smith
- Re: ls lacking a feature?
- References:
- ls lacking a feature?
- From: Bernard Liang
- Re: ls lacking a feature?
- From: Richard Heathfield
- Re: ls lacking a feature?
- From: Bernard Liang
- ls lacking a feature?
- Prev by Date: Re: Deleting substrings
- 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
|