LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 06-14-2005, 10:04 AM   #1
abbynormal
LQ Newbie
 
Registered: Jan 2005
Location: Kensington, MD USA
Distribution: Mandrake Standard 8.0
Posts: 20

Rep: Reputation: 0
bash configuration files


I've worked on various Unices over the years and am stumped and annoyed that I can't find the bash configuration files that are setting some environment variables and aliases that I don't like. I've looked at the .bash* files in my home directory and /etc/profile and /etc/bash* and don't see alias for ls set anywhere even though when I type alias at the command line ls is clearly set to
ls -F --color auto (I can barely read some of the lighter colors and want to remove the coloring altogether and for all terminals) I've read man pages for bash and ls, (having noticed there are also shell environment variables LS_COLORS and LS_OPTIONS set, which are not mentioned in the ls man page, which I also cannot find in any bash config file I've looked at. Where else do I need to look to find and change these defaults?

I know I could just add lines to unalias in my .bashrc file but it is annoying to not know where the aliases and environment variables are being set. Oh, and I'm using Mandrake 8.0 which I set up to dual boot on my old Win 95 machine.

TIA,
 
Old 06-14-2005, 10:39 AM   #2
tangle
Senior Member
 
Registered: Apr 2002
Location: Smithville, TN
Distribution: Slackware
Posts: 1,745

Rep: Reputation: 71
I am not sure in Mandrake, but in Slackware there an /etc//profile file that has aliases in for the ls command. There might be a .profile in your home directory that has aliases set there too.
 
Old 06-14-2005, 11:32 AM   #3
abbynormal
LQ Newbie
 
Registered: Jan 2005
Location: Kensington, MD USA
Distribution: Mandrake Standard 8.0
Posts: 20

Original Poster
Rep: Reputation: 0
I thought I checked these and didn't see it in there but I will look again. Thanks.
 
Old 06-14-2005, 01:18 PM   #4
jonaskoelker
Senior Member
 
Registered: Jul 2004
Location: Denmark
Distribution: Ubuntu, Debian
Posts: 1,524

Rep: Reputation: 47
the naive, lame, stupid and highly effective brute force solution, of course, is to just
$ grep -r 'alias.*ls' /*
... but be sure to avoid stuff like queue and socket files. Perhaps you want to use find with exec.

hth --Jonas
 
Old 06-15-2005, 05:13 PM   #5
abbynormal
LQ Newbie
 
Registered: Jan 2005
Location: Kensington, MD USA
Distribution: Mandrake Standard 8.0
Posts: 20

Original Poster
Rep: Reputation: 0
I finally found it before I saw the brute force suggestion. I had dabbled with brute force a bit but I didn't wait patiently for results.

What I finally found by looking closely at the file /etc/profile was the little loop:

for i in /etc/profile.d/*.sh ; do
if [ -x $i ]; then
. $i
fi
done

and
grep alias /etc/profile.d/*.sh
turned up various alias definitions in a file named /etc/profile.d/alias.sh
and
grep LS /etc/profile.d/*.sh
showed the environment variable LS_OPTIONS set and used in /etc/profile.d/color.sh to define the offending ls alias.

Thanks for your help, I hope this short trail helps someone else. Does anyone know why they might have made the default profile so convoluted? It seems more complicated and obscure than necessary.

Thanks again
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
bash: read lines from a configuration script ldp Programming 2 09-23-2005 11:58 AM
GRUB bash-like interface configuration trouble vishwanath_79 Linux - Laptop and Netbook 5 03-08-2005 02:00 AM
GRUB bash-like interface configuration trouble vishwanath_79 Linux - Software 1 03-08-2005 12:40 AM
making .tif files into animated .gif files (bash shell, Red Hat 7.2) illiniguy3043 Linux - Newbie 1 06-01-2004 04:04 PM
Where are programs files and configuration files stored? nutshell Linux - General 2 03-09-2002 10:24 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 09:06 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration