adapted from https://docs.csc.fi/img/csc-quick-reference/csc-quick-reference.pdf Note that this is simplified for beginners usage, once you get more experienced, you'll notice that there is more (and better) options for everything, and that not everything written here is "the whole truth".
- Puhti, Mahti, LUMI - supercomputers
- Pouta, Rahti - cloud services
- Allas - object storage
(all text within <> is replaced with real names, e.g. cp /home/user/my-file.txt scratch/project_200xxxx/new-directory
)
Check out all options of the commands with man <command>
(for manual), exit with q
.
ls
- list current directory contentscd <directory-to-change-to>
- change the current directorycd ..
- change to "one level higher" in directory treecd
- (without argument) change to $HOME
pwd
- print full path of the current directory
cp <file-to-copy> <destination>
- copy a filemv <file-to-move> <destination/new-file-name>
- move or rename a filerm <file-to-remove>
- delete a filemkdir <new-directory-name>
- create a directorytouch <new-file-name>
- create an empty new file
chmod <whowhatwhich> <file-name>
- change file permissions- who -> u: user , g: group , o: others, a: all
- what -> -:remove permission, +: add permission
- which -> r: read, w: write, x: execute
- example
chmod u+x my-batch-job-script.sh
adds execution rights for current user to the file
chgrp
- change file/folder owner
less <text-file>
- see text file (exit withq
)cat <file-name>
- see file contenthead <file-name>
- list ten first lines of the filetail -100 <file-name>
- show the last 100 lines
history
- show history of commands rungrep
- find rows containing a string- example:
history | grep "some strings"
would show you all commands in your history that contain "some string" (| is called a pipe)
- example:
echo "some text"
- prints some text to terminalexit
- quit the session on commandline<some command> > <file-name>
- output of a command to a file<some command> >> <file-name>
- append output of a command to a filewhich <application-name>
- shows path to the executable of an application
Defining a variable: MYPATH=/home/user/something
Using a defined or environment (predefined!) variable: $MYPATH
, e.g. to print its content: echo $MYVAR
Some environment variables:
$HOME
: users home directory$PATH
: path where executables are looked for$USERNAME
: current username$HOSTNAME
: current host system name
Process to edit a file in nano:
nano <file-name>
- (create and) open file with nano- edit your file
- when done, use
CTRL + o
key combination - (edit the filename and) press enter
- use
CTRL + x
key combination to exit the editor
Process to edit a file in vi:
vi <file-name>
- (create and) open file with vi- press
i
to switch to "edit mode" - edit your file
- when done, press
esc
to switch to "normal mode" - press
:wq
to save (write) the file and exit (quit) the editor
- press
scp <file name> <username@puhti.csc.fi:/scratch/project_200xxxx/dir_name>
- copy a file from current computer to Puhtiwget <some-url>
orcurl <some-url>
- get a file from the internet
- Geoinformatics applications and how to use them: https://docs.csc.fi/apps/by_discipline/#geosciences
module load <application-name>
- initialize the environment of an applicationmodule list
- list loaded applicationsmodule purge
- remove application environments
sbatch <batch-job-file>
- submit a jobsacct
- info about job statussqueue
- see the job status in the queuescancel <jobid>
- cancel a jobseff <jobid>
- info about completed jobs
- E-mail support: servicedesk@csc.fi
- Weekly virtual user support session (every Wed at 14): https://ssl.eventilla.com/usersupportcoffee
- Accounts, projects, forgotten password: https://my.csc.fi/
- on Puhti:
csc-workspaces
- on Puhti:
- CSC services and info: https://research.csc.fi/
- How to use them: https://docs.csc.fi/, https://docs.csc.fi/support/FAQ/, https://docs.csc.fi/support/tutorials/
- Geoinformatics examples: https://github.com/csc-training/geocomputing