type discriminating directory listing

George Seibel seibel at cgl.ucsf.edu
Mon May 8 18:22:54 AEST 1989


In article <LAWRENCE.89May8010357 at consult1.its.rpi.edu> tale at pawl.rpi.edu writes:
]In article <1529 at cmx.npac.syr.edu> gefuchs at skolem.uucp (Gill E. Fuchs) writes:
]GEF> what would be the command for getting a partial directory listings
]GEF> of only the subdirectories and symbolic-links ?
]
]% ls -al | egrep '^[ld]'
]
]It isn't the best as far as being stuck with the long format of ls,
]but it does the job.

try this for a nice listing of directories only.  cant guarantee how
portable it is, but it works on a number of bsd-ish and sysV-ish machines:

% /bin/ls -d */

George Seibel, UCSF.



More information about the Comp.unix.questions mailing list