Discussion:
Alias lsd
(te oud om op te antwoorden)
Feranija
2011-04-07 22:04:30 UTC
Permalink
For everyone's enjoyment; shows all directories, hidden and
non-hidden, and ignore everything else, no programming interpreters
involved:


alias lsd='/bin/ls -FAv |grep /$ | column'


Option "v" is not necessary; the alias works well without it, but I
find it useful for natural sorting numbers within text as per manual.

The "column" is a little program from util-linux. The alias works
well without the column too, but the column gives a nice clear sorting.

I've come up with this alias back in the year 2000, and I've always
hesitated to post it anywhere believing I am reinventing the wheel.

Since I posted this alias on Archlinux forums yesterday on April
6th, 2011, I may post it here too.
Sidney Lambe
2011-04-07 23:17:19 UTC
Permalink
Post by Feranija
For everyone's enjoyment; shows all directories, hidden and
non-hidden, and ignore everything else, no programming interpreters
alias lsd='/bin/ls -FAv |grep /$ | column'
Option "v" is not necessary; the alias works well without it, but I
find it useful for natural sorting numbers within text as per manual.
The "column" is a little program from util-linux. The alias works
well without the column too, but the column gives a nice clear sorting.
I've come up with this alias back in the year 2000, and I've always
hesitated to post it anywhere believing I am reinventing the wheel.
Since I posted this alias on Archlinux forums yesterday on April
6th, 2011, I may post it here too.
Nice little script. Be better if the regular files were displayed
_after_ the dirs.

How is archlinux? I've been reading the docs and it looks pretty
good. I'm using puppy right now, but it's got a lot of problems.
For one, it doesn't even have the column utility!

I had to chroot into slackware on another partition to run your
script.

Sid

Loading...