![](https://seccdn.libravatar.org/avatar/c8b5fd3e5b29813725509a325cacd33d.jpg?s=120&d=mm&r=g)
On Friday 02 January 2004 23:46 pm, Paul Cooke wrote:
Why with 'dir' existing in /usr/bin as a program coming from the Gnu coreutils, is there also an alias aliasing 'dir' to "ls -l"???
"alias dir='ls -l'" is in the alias list...
with the coreutils, surely the alias is surplus to requirements???
Good question, dunno...
Also, how can it be removed from the aliases?
The systemwide aliases are set in /etc/bash.bashrc - you can comment out the line: alias dir="ls -l" or if you want to unset it for just you put: unalias dir in your .bashrc file (create it if it's not there)
technical question... If I were to type 'dir', which would actually get executed??? the alias to the ls -l command or the 'dir' program?
With the alias defined, ls -l will execute because the alias is processed before the command is executed. One of the purposes of aliases is to override or set defaults for commands. Read man bash cor more info. Dylan -- Sweet moderation Heart of this nation Desert us not We are between the wars - Billy Bragg