Bash on the Cluster

HPC field guide · interactive

Bash on the cluster, without the guesswork.

A working reference for the commands you type every day on a login node: moving around, peeking into files, sending output where it belongs, and quoting things so the shell does what you meant. Every example has a copy button. Every common error has a fix.

ada@login01:/scratch/ada/project
[ada@login01 project]$ zcat S01_R1.fq.gz | head -n 4
@A00123:8:H7KXL:1:1101:1000:1000 1:N:0:ACGT
GATTACAGATTACAGATTACAGATTACA
+
FFFFFFFFFFFFFFFFFFFFFFFFFFFF
[ada@login01 project]$ wc -l < samples.txt
96
[ada@login01 project]$ ./align.sh "$SAMPLE" > aln.sam 2> align.log
    06

    Beginner errors, decoded

    Paste or type part of an error message into search. Each entry explains what the shell actually means and how to fix it.

    07

    One-page quick reference

    The condensed version. Click any command to copy it, or print this page for a sheet to keep beside the keyboard.