Bookmarking terminal commands

Kinniken

Registered
maybe its just me but I still have to find a way to store frequently used commands in the Terminal... I login via ssh 5 times a day to my University, and I'm getting bored with typing the whole lot every time...

TIA,

Kinniken
 
It only seem to remember commands I've typed in the current session... so if quit and relaunch the Terminal, I have to type it again =/

***Kinniken is off testing iPhoto
 
you can use
'alias (shortname) (really long name with options)'
to make a shorter name for something. Put as many aliases as you want in your .tcsh file, and they'll be remembered whenever you start a new shell.

here are some I use, for example:

alias ss 'ssh -X mds091@\!:1.usask.ca'
alias scpout 'scp -rpC \!:1 mds091@penguin7.usask.ca:\!:2'
alias scpin 'scp -rpC mds091@penguin7.usask.ca:\!:1 \!:2'
alias tardir 'gnutar -czf \!:1.tgz \!:1'
alias zipdir 'zip -r \!:1.zip \!:1'
alias startclassic 'open -a /System/Library/CoreServices/Classic\ Startup.app'
alias stopclassic 'kill `ps xc | grep TruBlueEnvironme | cut -c 1-5`'

the \!:1 refers to the first argument, \!:2 to the second, etc. - so 'ss penguin7' is translated to 'ssh -X mds091@penguin7.usask.ca' for example.
\!* refers to all the arguments, and there are a couple of other such sequences
 
or, to be more precise, the terminal seems to forget all the bookmarks everytime I quit it, which sort of makes the whole thing pointless... any ideas?
 
Back
Top