[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: dir is not ls



On Mon, Mar 19, 2012 at 08:08, rcb <rcb@beco.cc> wrote:
> Dear Debian users,
>
> Some old systems insists you type 'ls' and do not provide an alias do 'dir'.
> I loved this behavior.
>
> How can I make debian squeeze honor 'ls' again, and print a funny
> message to those who try to type 'dir'?
>
> I've look for a clean way to disable 'dir', but found nothing on
> ~/.bashrc, ~/.bash_alias, /etc/bash.bashrc or /etc/profile. Nor the
> command 'alias' give me any 'dir' alias.


Well, I believe dir is built into modern versions of GNU coreutils,
rather than being an alias or something:

https://www.gnu.org/software/coreutils/manual/html_node/dir-invocation.html#dir-invocation

But you can still override it. You could alias it to a shell script
that prints something or make it a function. Do it in /etc/ and it
affects everyone of course.

Cheers,
Kelly Clowers


Reply to: