## Basic UNIX commands (reminder)

Connecting to the front-end machines of the Vital-IT clusters:

• ssh <userName>@devfrt.vital-it.ch      (UNIL development machine)

Copying files from a local machine to the Vital-IT cluster:

• scp <fileName> <userName>@frt.vital-it.ch:~  (this will copy the file into your home on the cluster)
• On windows machines, use an external program such as FileZilla (https://filezilla-project.org) or WinSCP (http://winscp.net).

Simple text editors available on all Vital-IT machines:

• nano
• vim

Create a new work directory on the cluster in /scratch/cluster/weekly:

• Important: remember that any files older than 1 week are deleted from /scratch/cluster/weekly. Make sure to backup any file you wish to keep after the course to a different location (e.g. your home on Vital-IT, if you already have a Vital-IT account).

If you need more background information on UNIX, the following e-learning module is available: https://edu.sib.swiss/course/view.php?id=82

Important:

• We recommend that you create a folder in /scratch/cluster/weekly/ and that you perform all the exercises there. At the end of the workshop, you can copy the files you want to keep on your local machine or your Vital-IT home directory if you have an account.

1. Login to the cluster front-end.
Open a command line terminal on your local machine (a UNIX shell on Mac/Linux or putty on Windows), then log in to the Vital-IT (UNIL) cluster front-end machine using the following command:

• pwd (prints current working directory so you can see where you are)

2. Create a directory in /scratch/cluster/weekly/ and move into it.

• cd /scratch/cluster/weekly/

• wget ftp://ftp.vital-it.ch/edu/HPC/HPCexercises.tar.gz
• list the content of the compressed file: tar -ztvf HPCexercises.tar.gz  (the 't' lists the content of the archive. Notice the dates of the files.)
• Extract the content of the compressed file: tar -zxvmf HPCexercises.tar.gz  (note the use of the 'm' option in the tar command. The m option - for 'modification-time' - will set the current date and time to the extracted files. Why could this be important?)
4. Download a DNA sequence from www.ebi.ac.uk to your local computer and then copy it to the cluster.
on mac/linux: open a local session on the terminal, navigate to the location where AF311055 was saved and use the command scp AF311055 <userName>@devfrt.vital-it.ch:/scratch/cluster/weekly/<userName>/HPCexercises/exercise7/
on windows: use an external program such as FileZilla or WinSCP (see basic unix commands section above), or the Ubuntu on Windows shell.
• Rename the file "thio_rat.dna":
 # 1) login to cluster front-endssh @devfrt.vital-it.chpwd# 2) Create a directory in /scratch/cluster/weekly/# you can use your username instead of the command: whoamicd /scratch/cluster/weekly/mkdir whoamicd whoami # 3) Download a copy of the example files to your current folderwget ftp://ftp.vital-it.ch/edu/HPC/HPCexercises.tar.gztar -ztvf HPCexercises.tar.gztar -zxvmf HPCexercises.tar.gzrm HPCexercises.tar.gzcd HPCexercisescp /db/HPC-course/slides/thio_rat.dna exercise7/