-
Notifications
You must be signed in to change notification settings - Fork 0
Intro to CLI (Command Line Interface)
https://swcarpentry.github.io/shell-novice/
Why CLI?
The HPC has a limited graphical interface; getting the most out of the built-in functions will save you a great deal of frustration
man or -h/--help
...will bring up instructions for any that you’re trying to call.
Command line tutorials
http://linuxcommand.org/lc3_learning_the_shell.php
https://openclassrooms.com/en/courses/4614926-learn-the-command-line-in-terminal
Fundamentals
ls or ls
list information (what’s in this directory?)
cd or cd .. or cd
Change directory to path or up to parent directory or to ~/
mv
Move a file to another file
cp
Copy a file to another file
File manipulation
comm
Compare file 1 and 2, produce lines in common and unique to each file. File1 and 2 must be sorted first
sort
Sort file
head
Output first ten lines of a file (with -n option, output first n lines)
tail
Output last ten lines of a file (with -n option, output last n lines)
cat
Read /output contents of file
echo “”
Output text
Std I/O
<</>>
Ordinarily, standard input for a function come from/return to the terminal. You can redirect files in place of the terminal though.
echo “hello” >> hello
Chaining commands
Pipes! “|”
Redirects to a process, rather than a file. So you can chain together multiple commands.
cat seagate1.md5 | sed 's/[()]//g' | awk '{print $4,$2}' | sort > seagate_for_commm.md5
Shell variables
Say the magic $
One line magic
awk/sed/grep
for loops -
for/if/else/array loop structures
command editors
(vi/vim, emacs, nano)
shell tips & tricks
alias', .bash_rc, .bash_history, env’s
- Induction
- HPC Best practice
- Job Arrays - RC documentation
- Methods to Improve I/O Performance - RC documentation
- Customising your bash profile for ease and efficiency
- Customise bash profile: Logging Your Command History Automatically
- Using the ei-gpu partition on the Earlham Institute computing cluster
- Using the GPUs at EI
- HPC Job Summary Tool
- EI Cloud (CyVerse)
- Git and GitHub
- Worked examples
- Job Arrays
- Using Parabricks on the GPUs
- dependencies
- Software installations
- Workflow management system
- Transfers
- Local (mounting HPC storage)
- Remote - <1gb (ood)
- Remote - <50gb (nbi drop off)
- Remote - No limit (globus)
- mv command