Re: Simple sh or alias to list directories
; --xHFwDpU9dbj6ez1V
; Content-Type: text/plain; charset=us-ascii
; Content-Disposition: inline
; Content-Transfer-Encoding: quoted-printable
;
; > I use alias ld=3D'ls -l | grep "^d"'
; >=20
; > Many interesting ways of doing the same thing :)
;
; Just make sure you don't get that confused with the _real_ "ld" command (the
; GNU linker)! :-P
Firstly, is that html really necessary? Secondly, you're better of using
shell functions than 'aliases', they're a lot more versatile. I have the
following builtins defined in my shell (rc) which could be trivially be
used in bash in a similar way.
fn ls {builtin ls -F $*}
fn lsf {ls $*|sed '/[/@|]$/d;s/\*$//'}
fn lsd {ls $*|egrep -v '[^/]$|^\.\.?/$'}
r.
Reply to: