LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   where is bash startup script? (https://www.linuxquestions.org/questions/linux-newbie-8/where-is-bash-startup-script-127694/)

gvaught 12-20-2003 08:20 PM

where is bash startup script?
 
Greetings. This is a newbie question if there ever was one.

I altered a "script" to alias some shell commands to act like old DOS commands (old habits and all). The problem I'm having is that (1) the aliasing doesn't work (I get lot's o' errors) and (2) I forgot which script I altered, and the directory it was in.

At this point I know that somewhere on my hda there is a script which contains the following:

alias dir = ls

and the only time I notice this has errored is when I open a shell and I'm in some sort of utility which looks an awful lot like less (except there is nothing displayed except the "end" block). I am using RH8 and bash.

???

2damncommon 12-20-2003 08:52 PM

Typing "dir=ls" will create an alias.
Typing "alias" will list your alias'.
Typing "unalias dir" will remove the alias you created.

EDIT. And I'm forgetting to mention that your ".bashrc" file is the one you edited.

gvaught 12-21-2003 04:41 AM

All well and good (I've given up the aliasing thing for now). The problem I'm having is that I can't find .bashrc. I can find /etc/bashrc, but it doesn't have the offending code. Can you tell me where RH may have placed the .bashrc? I've done a 'find' on /etc but can't seem to locate the file. Command is as follows:

# find /etc .bashrc

Searches the directory tree but doesn't find the file. Same for

# find /usr .bashrc

and

# find / .bashrc

will 'find' not find hidden files? If not, how do I locate this file? It's really making me mad that I could be so stupid as to forget which file (and where) I edited. But after an 18 hour day, I really should have been reading instead of editing initialization scripts.

druuna 12-21-2003 04:47 AM

Ok, I don't use RH, but there shouldn't be any . (dot) files in /etc.

bashrc (or something simular) can be found in /etc
.bashrc are in the home ditrectories of the users.

PS: find will find dot files.

gvaught 12-21-2003 04:50 AM

Thanks. At least I know I'm not losing it.

Now, where to find .bashrc...

2damncommon 12-21-2003 05:05 AM

Does "ls -la /home/(your username)/.b*" show any bash files?

gvaught 12-21-2003 05:10 AM

MOST EXCELLENT!!!

I will NOT forget where that file is from now on!

Many thanx to U


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