Last active
December 30, 2015 22:49
-
-
Save lcolladotor/7897221 to your computer and use it in GitHub Desktop.
Local and cluster .bashrc files for "Login to the cluster, request a node and change to your project directory in a single command" as described in http://bit.ly/FellBit
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## change dir automatically when using qrsh | |
## Details: https://github.com/rkostadi/BiocHopkins/wiki/Useless-Tips-&-Code-Snippets | |
if [ -f ~/.bash_pwd ]; then | |
source ~/.bash_pwd | |
rm ~/.bash_pwd | |
fi | |
alias qr='echo "cd $PWD" > ~/.bash_pwd; history -w; qrsh' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Servers | |
alias enigma="ssh enigma" | |
# qrsh | |
alias qr="ssh -t enigma 'cd /very/complicated/path/to/projectDir/; source /etc/profile; echo \"cd \$PWD\" > ~/.bash_pwd; history -w; qrsh'" | |
#qrsh-basename | |
alias qs='LEODIR=`basename $PWD`; ssh -t enigma "cd /very/complicated/path/to/projectDir/$LEODIR/; source /etc/profile; echo \"cd \$PWD\" > ~/.bash_pwd; history -w; qrsh"' | |
# basename, but no qrsh | |
alias qq='LEODIR=`basename $PWD`; ssh -t enigma "cd /very/complicated/path/to/projectDir/$LEODIR/; source /etc/profile; echo \"cd \$PWD\" > ~/.bash_pwd; history -w; bash"' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## .ssh/config local file | |
Host enigma | |
User username | |
Hostname enigma2.etc.edu | |
ForwardX11 yes |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment