Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

This page provides a basic introduction to briefly introduces Unix commands to for HPC users with no previous knowledge.without previous knowledge.

Pre-requisites:

Installing Putty and connecting to the HPC (Windows users; Mac users can directly use the available ‘terminal’ app)

Install Putty:

Installing PuTTY - QUT Media Hub

Connect to the HPC:

Connecting to the HPC with PuTTY - QUT MediaHub

Log into the HPC

Code Block
ssh userID@lyra.qut.edu.au

Brief basic Unix commands

Once you log into the HPC, you will land in your personal home space (i.e. /home/myStudentID/). This space is only accessible to you. To work in collaboration with others we use workspaces (i.e. /work/myProjectName/).

To go to a shared directory for your project named “kenna_team” team, for example type the following command and hit enter:

Code Block
cd /work/trtp

Display list of files/directories in a directory

Code Block
ls -lh

Print working directory

Code Block
pwd

Go to a sandpit folder

Code Block
cd sandpit/

check available files and folders

Code Block
ls -lhtr

Create a folder

Code Block
mkdir myfoldermyname

Enter new folder

Code Block
cd myfolder myname/data

#check working directory path
pwd

Move back to the previous folder(s)

Code Block
cd ..
cd ../../

Make a backup copy of the file

Code Block
cp myfile.txt myfile_copy.txt 

Move a copy of a file to a newly created folder - note it is recommended to make a copy of important files prior to modifying or executing commands on them.

Code Block
mv myfile_copy.txt myfolder/launch_ENA_download.pbs ./myname/data

#check that file has been copied
ls -lh ./myname/data

View the content of a file (note hashtags # at the start of a line is used to provide information of the code underneath it - the commented lines are not executed)

Code Block
#hash tags are used to add comments on what a command line does
#several commands can be used including cat, less, more, head and tail
cat myfile_copy.txt

#example: less -S allows to visualise very large (wide) files
less -S myfile_copy.txt

#stop viewing a file using the above command
--> Type “Control” and “c” at the same time.
      Or “Control” and “d” at the same time.

#print the first 505 lines of a file
head -505 myfile_copy.txt

#print the last 205 lines of a file
tail -205 myfile_coy.txt

Go back to my personal space. Type 'cd' and hit enter. This will move you to /home/mystudentID/

Code Block
cd

(Optional) Interactive session:

Code Block
qsub -I -S /bin/bash -l walltime=10:00:00 -l select=1:ncpus=2:mem=4gb

Create a folder to download data from ENA

Code Block
mkdir myname/data

Move to the data folder:

Code Block
cd mynam/data

Go to: Task 2: Download public RNA-seq data