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
nanoto 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 dirto move a file or directoryoldto another directorydir. - Use
mv old newto rename a file or directoryoldto anewname. - Use
cp old newto copy a file under a new name or location. - Use
cp old dircopies a fileoldinto a directorydir. - Use
rm oldto 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.