bash ls
ref- OS: Suse 9.2, running kde, bash
ls behavior bash "ls" when run by root seems to default to "ls -a" form, showing every normally hidden file. When run as a regular user, it runs normally, that is hiding the dotted files. ls is normal under "sh" for the root user. what's with that? thanks! |
Is ls aliased to ls -a for root? You can use the alias command to see all of the aliases that are currently set in the shell.
|
yest that's it
ls is aliased to /bin/ls $LS_OPTIONS now hunting around for where LS_OPTIONS is set for root ... thanks |
Code:
echo $LS_OPTIONS Code:
LS_OPTIONS=whatever you want it to be, I like -l Code:
export LS_OPTIONS as for changing it permanently try google. you could set your own options or remove the alias if you want it to behave "normally" |
The defaults are set in /etc/bashrc and they can be overridden in a .bashrc or .bash_profile file in the home directory.
|
On Suse the settings for bash are in /etc/bash.bahsrc where you can see the relevant part:
Code:
if test "$UID" = 0 ; then |
that nails it.
In retro I could have tried a grep LS_ /etc/*rc which shows that csh also prescribes a set of ls defaults as well. thanks all P |
All times are GMT -5. The time now is 08:20 AM. |