Originally Posted by mlpa
My question is, what is the content of a .bashrc file and a .bash_profile file.
Where are they located, stuff like that.
They're "hidden" files within each user's home directory. To see them, do an "ls -a". Note that the files are not required to exist, nor do you have to have both (you could create one, and symlink the other).
See the bash man page (man bash) if you're interested in the differences between .bashrc and .bash_profile.
As for what goes into them;
Nothing. The "Good Stuff" should be defined in the global profile files.
A user can specify environment variables within their own .bashrc/.bash_profile file in order to override previously set "Global Defaults" (usually specified in /etc/bashrc or /etc/default/bashrc, check your *NIX distribution's documentation)
You can change the PS1 and PS2 shell prompts, define command aliases, setup custom environment variables.
It's also possible to setup the shell's command logging options via HISTFILE= HISTSIZE= and a few others.
Basically, if you took an autoexec.bat file, rolled it in ecstasy and dipped it in chocolate, that's what a .bashrc file is for. Only it's per-user.
Note: When a user calls you with a problem, check the time/date stamp on their shell's profile file (ksh uses .kshrc, csh uses .cshrc, bash can use .bashrc and/or .bash_profile). If the timestamp is recent, they !@#$%^-up their profile.
EDIT: To give you an idea of what's in one, here's my *extremely* customized .kshrc file (similar to a .bashrc/.bash_profile. It might even work if renamed)