Re: ls lacking a feature?



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. :-)


.



Relevant Pages

  • Re: ls lacking a feature?
    ... seems to do the trick for me, but this is a very cheap hack, and is ... dependent on what fields ls decides to print. ... ls is lacking several features. ...
    (comp.programming)
  • Rename a view that has dependent views
    ... I would like to rename some of these ... without breaking the dependent views. ... stored procedures and views, flush the procedure cache to ensure all ... Or am I missing something and sp_rename does do the trick? ...
    (microsoft.public.sqlserver.tools)