Why Use HPC?
- High Performance Computing (HPC) typically involves connecting to very large computing systems elsewhere in the world.
- These HPC systems can be used to do work that would either be impossible or much slower or smaller systems.
- The standard method of interacting with such systems is via a command line interface such as Bash.
Connecting to the remote HPC system
- To connect to a remote HPC system using SSH and a password, run
- To connect to a remote HPC system using SSH and an SSH key, run
Working with files
- Use
nano
to create or edit text files from a terminal. - Use
cat file1 [file2 ...]
to print the contents of one or more files to the terminal. - Use
mv old dir
to move a file or directoryold
to another directorydir
. - Use
mv old new
to rename a file or directoryold
to anew
name. - Use
cp old new
to copy a file under a new name or location. - Use
cp old dir
copies a fileold
into a directorydir
. - Use
rm old
to delete (remove) a file. - File extensions are entirely arbitrary on UNIX systems.
Wildcards and pipes
- The
*
wildcard is used as a placeholder to match any text that follows a pattern. - Redirect a command’s output to a file with
>
. - Commands can be chained with
|
Scripts, variables, and loops
- A shell script is just a list of bash commands in a text file.
- To make a shell script file executable, run
chmod +x script.sh
.