[X-Unix] setting up aliases in bash / Tiger
Stroller
macmonster at myrealbox.com
Wed Sep 27 10:52:58 PDT 2006
On 27 Sep 2006, at 18:40, ..lj wrote:
> On Sep 27, 2006, at 10:18, David Gilden wrote:
>>
>> Could someone point to me tutorial that would show me what files
>> in Tiger
>> I can edit in Terminal so that I can set up some basic aliases...?
>
> try editing
> ~/.profile
Why .profile & why not .bash_profile? There must be a difference
between them - anyone got any ideas what?
This is what I have:
970 ~ $ cat .bashrc
PS1="\! \w \$ "
alias rm="rm -i"
alias mv="mv -i"
alias cp="cp -i"
export HISTSIZE=900
export HISTFILESIZE=900
export PATH=$PATH:/Developer/Tools/:/usr/local/bin:/usr/local/bin
971 ~ $ cat .bash_profile
#alias ssg="ssh -q -o StrictHostKeyChecking=no -o
UserKnownHostsFile=/dev/null"
alias ssg="ssh -o StrictHostKeyChecking=no -o UserKnownHostsFile=/
dev/null"
#This file is sourced by bash when you log in interactively.
[ -f ~/.bashrc ] && . ~/.bashrc
972 ~ $
I can't remember exactly why one set of aliases is one & not the
other. Most of the time both shells are sourced, but I believe there
are some commands that you might not wish to be aliased in a non-
interactive shell (such as a cron job?).
Stroller.
More information about the X-Unix
mailing list