Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Permanent creation of Alias

Status
Not open for further replies.

hubud

Instructor
Oct 18, 2002
123
GB
I have been using the alias command and find that on exit and reconnection I have to reissue the alias command.

Is there a way of creating these as permanent additions to your env?

I'm using solaris2.8


cheers

simmo
 
If you're running a C shell (csh) rather than a Bourne (sh) or Korn (ksh) shell, then you'll need to put them in .cshrc instead of .profile in your home directory.


 
how do you add this. I have put it in my .profile as

l50='ls -lrt | tail -50'
lf='/users/msimcox/lf.ksh'

This does not pick it up. I have also put "alias" in front of each line, this does no good.

Any advice.

cheers

simmo
 
If you are using bash there is a file you can call named .bash_aliases.

-bp
 
for ksh, put these line in a file named .kshr can this in your .profile:

ENV=$HOME/.kshrc
export ENV

and in your .kshrc file:

alias l50="ls -lrt | tail -50"
alias lf="/users/msimcox/lf.ksh"
 
I don't know how I got that so garbled: [blush]

put this in your .profile:

ENV=$HOME/.kshrc
export ENV

and this in a file named .kshrc in your home directory:

alias l50="ls -lrt | tail -50"
alias lf="/users/msimcox/lf.ksh"
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top