-
Notifications
You must be signed in to change notification settings - Fork 0
Preliminaries: Using the commandline, signing into a server, and submitting jobs to a HPC
barrettlab edited this page Jun 1, 2021
·
4 revisions
[cfb0001.LSB5218] >
### or something like that...
### General usage below. You will use YOUR username, my server address, etc.
ssh username@servername.server.address.edu
### Now, enter your case-sensitive password.
### Once you have successfully logged in, to may need to type:
bash
### This will enter you into the bash shell (before you might have just been in the Linux system but not in bash)
### to log off, type 'exit'
Logging into ‘myco’ (the Barrett Lab server) and a HPC cluster: this is a short video by Dhanu Ramachandran, our CPING postdoc.
man
man ls
man grep
clear
history
date
whoami
id
groups
who
last
hostname
w
uname
ls
ls -l
ls -a
touch file1.txt
ls
cp file1.txt file2.txt
ls
mv file2.txt file3.txt
ls # to see what just happened -- how does it compare to 'cp'?
head file1.txt # this is a blank file!
echo "How's it going?" >> file1.txt
head file1.txt
cat file1.txt
echo "ATGGTGACGTGCAAACGTGTGTGTGTGTGTGTG" > file2.txt
head file2.txt
cat file1.txt file2.txt > file3.txt ; head file3.txt
less file3.txt # press 'q' to quit
top # list all current processes. This allows you to check who is running what. press 'q' to exit.
htop # A super fancy version of top. Use this to monitor RAM usage across multiple cores on a server. Press 'F10' button to exit
# kill ### DON'T enter this now, but this is how you stop a particular process
ln #make links between files
pwd
cd ..
ls
pwd
cd -
pwd
mkdir new_directory
ls new_directory
pwd # where am I?
cd ~ # go to home folder
cd / # go to the ROOT of the directory structure
cd /home/cbarrett # The absolute path to your home folder. This always leads with the ROOT '/'
cd /usr/local/src # We typically use this folder to store source code before compiling new software. Download new software here
cd /usr/local/bin # This is where we keep our binaries, the compiled, executable software
cd /data # This is where we store everyones' data
cd /data/cbarrett # This is where I store my data
cd /data/cbarrett [press tab twice] # This will list all the subdirs of /data/cbarrett
sudo # To see some options
sudo [some_command] # Enter your login password. This will give you permission to do things like modify files and run software # It is really just a security thing, giving you elevated permissions to run admin tasks
export PATH=/usr/local/bin:$PATH
export PATH=/usr/bin:$PATH
export PATH=/usr/local/src:$PATH
export PATH=/usr/local/src/ncbi-blast-2.10.1+/bin:$PATH
export PATH=/data/mmckain/Fast-Plast:$PATH
source ~/.bashrc
sudo nano ~/.bashrc
### This is your bashrc profile, which tells UNIX where to look for software
export PATH=/usr/local/bin:$PATH
export PATH=/usr/bin:$PATH
export PATH=/usr/local/src:$PATH
export PATH=/usr/local/src/ncbi-blast-2.10.1+/bin:$PATH
export PATH=/data/mmckain/Fast-Plast:$PATH
Then type:
source ~/.bashrc
Save and exit:
ctrl+X
### To save and exit