1832188 Members
2923 Online
110038 Solutions
New Discussion

declare alias on system

 
SOLVED
Go to solution
Juan Manuel López
Valued Contributor

declare alias on system

Hi all !.
I think the way to declare alias on HP/UX is on /etc/profile file, like:
alias rm='rm -i'

Right ?

Thanks, Juanma.
I would like to be lie on a beautiful beach spending my life doing nothing, so someboby has to make this job.
4 REPLIES 4
Leif Halvarsson_2
Honored Contributor

Re: declare alias on system

Hi
Yes it should work. Do you have any problem ?
T G Manikandan
Honored Contributor
Solution

Re: declare alias on system

If you are using sh or ksh you can use

(define alias globally)
alias 'rm=rm -i' in your /etc/profile
(define alias locally)
.profile of the user home dir.

if you are using csh then
local
.cshrc

alias rm 'rm -i'

if you are defining globally for all the users using c shell as default then
use
/etc/csh.login.


Thanks
Leif Halvarsson_2
Honored Contributor

Re: declare alias on system

Hi

Sorry, I did not notice your question about .profile. Have a look at this thread.

http://forums.itrc.hp.com/cm/QuestionAnswer/1,,0x588193e260b0d611abdb0090277a778c,00.html
Juan Manuel López
Valued Contributor

Re: declare alias on system

Thanks a lot for your help.
I have confirmed this dub.
Thanks.

Juanma.
I would like to be lie on a beautiful beach spending my life doing nothing, so someboby has to make this job.