Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 2 Next »

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

Log into the HPC

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” type the following command and hit enter:

cd /work/trtp

Display list of files in a directory

ls -lh

Print working directory

pwd

Create a folder

mkdir myname

Enter new folder

cd myname

Move back to the previous folder

cd ..

Make a backup copy of the file

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.

mv myfile_copy.txt myfolder/

View the content of a file (note hashtags # at the start of a line is used to provide information of the code underneath it)

#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 50 lines of a file
head -50 myfile_copy.txt

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

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

cd

Interactive session:

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

  • No labels