These are some of the more commonly used UNIX commands.
<up/down arrow>
<control>-c
<control>-r (then type the search string)
clear
cd
This makes sure you're not using your lab's computing allotment This is only if you already have an MSI account through a research lab.
newgrp mice5035
ls
ls ..
ls /path/to/other/directory
pwd
mkdir bin
ls
cd bin
cd ..
unzip zippedfile.zip
rm unwantedfile.txt
wc filename.txt
rm -r unwanteddirectory
head myfile.txt
cut -f 1-3 myfile.txt
cut -f 1-3 -d "," myfile.txt
cut -f 1-3 -d myfile.txt | head
cut -f 1-10 -d "," myfile.txt | less
less myfile.txt
cp file1.txt file2.txt
cp /full/path/to/other/file.txt .
cp -r directory1 directory2
mv oldname.txt newname.txt
du -hs *
nano somefile.txt
<ctrl>-c
grep ">" input.fna
grep -v ">" input.fna
grep -c ">" input.fna
If you need to run something that will take a while, there are ways to keep an interactive computing session open on MSI. One way is to log in to a specific login node (e.g. ahl01
), open a "screen" session, and then start your interactive session. The screen session will stay open on the login node if you disconnect and connect again later. Here are the steps:
- When you first connect to MSI, connect to a specific login node:
ssh username@ahl01.msi.umn.edu
- Start a "screen" session (like opening a browser window, conceptually)
screen
- Launch your compute node
srun ...
- When you need to log off temporarily, detach from the screen session (don't hold ctrl after the
a
)
<ctrl>-a d
Then exit the login node with <ctrl>-d
or exit
.
5. When ready to log back on, connect to the same login node:
ssh username@ahl01.msi.umn.edu
- Re-attach to the screen session
screen -Dr
Now you are back on the compute node, right where you left off. If you had a command running, it will have continued running in the background.
<ctrl>-a c
<ctrl>-a n
<ctrl>-a p
<ctrl>-d