Results 1 to 4 of 4
I was wondering if there is any reason why alias ls='ls -la' does not work? alias dir ='ls -la' works fine. Can't you overwrite ls for some reason? All changes ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
- 09-18-2003 #1
alias ls='ls -la'
does not work?
alias dir ='ls -la'
Can't you overwrite ls for some reason? All changes where made in ~/.bashrc
Works fore me on FreeBSD
cheersI am on a journey to mastering Linux and I got a bloody long way to go!!!
- 09-18-2003 #2
- Join Date
- Oct 2001
- Täby, Sweden
That certainly works; I assume that it simply is that something else is overwriting it later. Can you post your .bashrc?
- 09-19-2003 #3
That was it for sure. i got confused because of the order of commenting.
You can see below what I did at first.
# User specific aliases and functions
alias ls='ls -a'
alias dir='ls -la'
# Source global definitions
if [ -f /etc/bashrc ]; then
fiI am on a journey to mastering Linux and I got a bloody long way to go!!!
- 10-03-2003 #4
- Join Date
- Nov 2002
It looks like you are using Mandrake or Redhat Linux because your .bashrc file looks like mine and I'm using Mandrake 8.2 Anyway, the default Mandrake sets up an alias for ls somewhere in one of the startup scripts, probably in /etc/bashrc. The default is something like
alias ls='ls -F --color'
If you move those alias lines in your .bashrc script to the end of the file, after it loads the /etc/bashrc, it should work.
Actually you might prefer this:
alias ls='ls -laF --color'