 |
 |
Aliases
|
 |
|
 |
|
Junior Member
Join Date: Sep 2002
Location: The Alamo City
Status:
Offline
|
|
I frequently ssh to the system at school and would really like to cut down on my kestrokes (i.e. be lazy). So instead of ssh -l username servername, I would like to create an alias. However, where do I create it.
I know it were a cShell (csh), I could edit .cshrc and create the alias there, but where would I do it on my Mac?
Thanx!
|
|
|
| |
|
|
|
 |
|
 |
|
Addicted to MacNN
Join Date: May 2001
Location: Cupertino, CA
Status:
Offline
|
|
Edit .cshrc and create the alias there... unless you've switched to a different shell for some reason.
|
|
|
| |
|
|
|
 |
|
 |
|
Dedicated MacNNer
Join Date: Nov 2000
Status:
Offline
|
|
For tcsh:
echo "alias foo 'echo foo'" >> ~/.cshrc
for bash:
echo "alias foo='echo foo'" >> ~/.bashrc
|
|
|
| |
|
|
|
 |
|
 |
|
Junior Member
Join Date: Sep 2002
Location: The Alamo City
Status:
Offline
|
|
>>Edit .cshrc and create the alias there... unless you've switched to a different shell for some reason.
Isn't the default Terminal tcsh? How would I go about changing it to csh, if it's even possible?
>>For tcsh:
echo "alias foo 'echo foo'" >> ~/.cshrc
What does this do?
I know I could change the sell via chsh, but how do I know if I have csh.
Thanks for everyone's help!
|
|
|
| |
|
|
|
 |
|
 |
|
Addicted to MacNN
Join Date: May 2001
Location: Cupertino, CA
Status:
Offline
|
|
tcsh reads the .cshrc file when it starts up just like csh does, so you can put whatever variables or aliases you want to set in there. Just remember to quit and restart Terminal for it to take effect.
|
|
|
| |
|
|
|
 |
|
 |
|
Junior Member
Join Date: Sep 2002
Location: The Alamo City
Status:
Offline
|
|
Ok, next questions: where is the .cshrc file?
I tried locate, but it returned nothing.
|
|
|
| |
|
|
|
 |
|
 |
|
Addicted to MacNN
Join Date: May 2001
Location: Cupertino, CA
Status:
Offline
|
|
It's at the top level of your home directory, at ~/.cshrc
I guess you may have to create one if it isn't already there.
|
|
|
| |
|
|
|
 |
 |
|
 |
|
|
|
|
|

|
|
 |
Forum Rules
|
 |
 |
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
|
HTML code is Off
|
|
|
|
|
|
 |
 |
 |
 |
|
 |