Boston Linux & Unix (BLU) Home | Calendar | Mail Lists | List Archives | Desktop SIG | Hardware Hacking SIG
Wiki | Flickr | PicasaWeb | Video | Maps & Directions | Installfests | Keysignings
Linux Cafe | Meeting Notes | Linux Links | Bling | About BLU

BLU Discuss list archive


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Basic bash help



I could use a little help with bash.  I'm using it on a couple of 
different machines -- one running Slackware, another RH.  All I'm 
trying to do right now is set up a few simple aliases.  I'm familiar 
with the command line and the concept of aliases, what I can't figure 
out is where and how they get set.

For example on the RH system it appears that .bashrc in the user's home 
directory runs /etc/bashrc which in turn runs *.sh from /etc/profile.d. 
The scripts in profile.d set some global aliases:

     alias cp='cp -i'
     alias mv='mv -i'
     alias rm='rm -i'
     alias vi='vim'
     alias which='alias | /usr/bin/which --tty-only --read-alias --show-
dot --show-tilde'

The aliases for vi and which are findable in the files in profile.d, 
however those for cp, mv, and rm are not there nor in ~/.bashrc, nor in 
/etc/bashrc.  Where might they be?

Also, for my own aliases, where is the usual place to set them if I 
want them global?  Specific to a particular user?  Do I create my own 
script in profile.d for my own aliases, or modify an existing script?  
For local ones do I use ~/.bashrc, or make it call a separate script?  
I know all of these approaches will work, I'm wondering if there is a 
common practice for defining aliases.

Thanks,

--
Tom







BLU is a member of BostonUserGroups
BLU is a member of BostonUserGroups
We also thank MIT for the use of their facilities.

Valid HTML 4.01! Valid CSS!



Boston Linux & Unix / webmaster@blu.org