LinuxQuestions.org
Latest LQ Deal: Linux Power User Bundle
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 12-20-2003, 09:20 PM   #1
gvaught
Member
 
Registered: Sep 2003
Location: MidWest
Distribution: Debian GNU/Linux 8 (jessie)
Posts: 199

Rep: Reputation: 30
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.

???
 
Old 12-20-2003, 09:52 PM   #2
2damncommon
Senior Member
 
Registered: Feb 2003
Location: Calif, USA
Distribution: Debian Wheezy
Posts: 2,870

Rep: Reputation: 87
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.

Last edited by 2damncommon; 12-20-2003 at 09:55 PM.
 
Old 12-21-2003, 05:41 AM   #3
gvaught
Member
 
Registered: Sep 2003
Location: MidWest
Distribution: Debian GNU/Linux 8 (jessie)
Posts: 199

Original Poster
Rep: Reputation: 30
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.
 
Old 12-21-2003, 05:47 AM   #4
druuna
LQ Veteran
 
Registered: Sep 2003
Posts: 10,532
Blog Entries: 7

Rep: Reputation: 2387Reputation: 2387Reputation: 2387Reputation: 2387Reputation: 2387Reputation: 2387Reputation: 2387Reputation: 2387Reputation: 2387Reputation: 2387Reputation: 2387
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.
 
Old 12-21-2003, 05:50 AM   #5
gvaught
Member
 
Registered: Sep 2003
Location: MidWest
Distribution: Debian GNU/Linux 8 (jessie)
Posts: 199

Original Poster
Rep: Reputation: 30
Thanks. At least I know I'm not losing it.

Now, where to find .bashrc...
 
Old 12-21-2003, 06:05 AM   #6
2damncommon
Senior Member
 
Registered: Feb 2003
Location: Calif, USA
Distribution: Debian Wheezy
Posts: 2,870

Rep: Reputation: 87
Does "ls -la /home/(your username)/.b*" show any bash files?
 
Old 12-21-2003, 06:10 AM   #7
gvaught
Member
 
Registered: Sep 2003
Location: MidWest
Distribution: Debian GNU/Linux 8 (jessie)
Posts: 199

Original Poster
Rep: Reputation: 30
MOST EXCELLENT!!!

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

Many thanx to U
 
  


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
'cannot stat' script in /etc/rc.d/, try to run script at startup quintan Linux - Software 1 11-21-2005 03:53 AM
How to call a script from a system startup script? jonatito Linux - Newbie 7 11-11-2005 10:40 PM
send automatic input to a script called by another script in bash programming jorgecab Programming 2 04-01-2004 01:20 AM
bash script - incrementing a filename in a script tslinux Programming 10 08-06-2003 12:58 AM
bash script prob: how can i tell the script that a 'dd' has finished? Frustin Linux - General 2 04-02-2003 06:34 AM


All times are GMT -5. The time now is 08:45 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