Re: Where is the file that sets aliases?

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



On Sat, 2008-11-08 at 19:39 +0000, Anne Wilson wrote:
> On Saturday 08 November 2008 19:00:56 Ignacio Vazquez-Abrams wrote:
> > On Sat, 2008-11-08 at 18:57 +0000, Anne Wilson wrote:
> > > I was having a problem in a shell script that turned out to be cp being
> > > aliased to 'cp -i'.  Not a showstopper, once you realise it, but it did
> > > beg the question as to where this file is.  I was told to look in
> > > /etc/profile.d, but that doesn't seem to be the case on my CentOS box.  I
> > > can list aliases, so I know the file exists, but where?
> >
> > ~/.bashrc
> >
> That seems to be the place to add user-specific ones, but where are the global 
> default ones?

/etc/bashrc

But be aware that root-specific ones are here on 5.x

# grep alias .bashrc
# User specific aliases and functions
alias rm='rm -i'
alias cp='cp -i'
alias mv='mv -i'

> 
> > FTR, you can use \cp to get around this.
> 
> I was told that, and also told that it was advisable to use the full path in a 
> script, particularly if it is to be run by cron.  I chose the full-path 
> solution.

Unambiguity is _always_ preferred if security is a primary issue.
Anytime higher privileges are involved, that should be a high-priority
issue.

> 
> Anne
> <snip sig stuff>

-- 
Bill

_______________________________________________
CentOS mailing list
CentOS@xxxxxxxxxx
http://lists.centos.org/mailman/listinfo/centos

[Index of Archives]     [CentOS]     [CentOS Announce]     [CentOS Development]     [CentOS ARM Devel]     [CentOS Docs]     [CentOS Virtualization]     [Carrier Grade Linux]     [Linux Media]     [Asterisk]     [DCCP]     [Netdev]     [Xorg]     [Linux USB]
  Powered by Linux