Essential Linux Commands¶
Interacting with the CoSTAR cluster happens mostly via a text-based Linux terminal. If you are new to this environment, we suggest you review the Surrey Unix Tutorial for Beginners.
Use the tabs below to find common commands categorised by workflow, along with specific examples of how they apply to cluster tasks.
Command |
What it does |
HPC Example / Context |
|---|---|---|
|
Print Working Directory. Shows where you are. |
Check if you are in |
|
Lists directory contents with human-readable file sizes. |
|
|
Change Directory. Moves you to a new folder. |
|
|
Creates a new directory (and parent folders if missing). |
|
|
Copies files or directories recursively. |
Copy a template batch script into your working workspace. |
|
Moves or renames files and directories. |
Rename a generic checkpoint file to a specific iteration name. |
|
Forcefully and recursively deletes files/folders. |
Use with extreme caution. Erases directories without prompting. |
Command |
What it does |
HPC Example / Context |
|---|---|---|
|
Dumps the entire contents of a file directly into the terminal. |
Good for quickly verifying a short, 10-line Slurm batch script. |
|
Opens a scrollable reader. Press |
Use this to inspect large execution logs without crashing your terminal. |
|
Displays the final 20 lines of a file. |
Quickly check if a completed job threw an error at the very end. |
|
Displays the end of a file and updates in real-time as lines are added. |
Run |
|
Searches inside text files for specific strings or phrases. |
|
|
A simple, straightforward command-line text editor. |
Great for quick, live modifications to your Slurm option flags. |
Command |
What it does |
HPC Example / Context |
|---|---|---|
|
Marks a file as executable. |
Run |
|
Summarises the total disk space used by a file or folder. |
|
|
Runs a command repeatedly every |
|
|
Appending help flags lists usage manuals for custom tools. |
Useful for investigating deep tools like |
Next Steps¶
Test your understanding of the introductory material before moving to Module 2.