Bash and Docker Cheat Sheets
Docker Cheat Sheet
While the tutorial utilizes docker to provide portability and setup simplicity, we have attempted to develop it such that the number of docker commands is as few as possible. Below you can find the necessary docker commands to run the tutorial.
Command |
Description |
|---|---|
|
start tutorial containers in detached mode |
|
enter elm-fates container shell |
|
teardown the tutorial containers |
We also provide a helper script to start the jupyter lab container in your default web browser: launch_jupyter. You will find windows and linux versions of the script, differentiated by the file extension (i.e. .sh and .bat for linux/mac and windows respectively)
Bash Cheat Sheet
We have tried to keep shell scripting to a minimum during the tutorial, but some use of terminal and bash commands is necessary to demonstrate FATES workflows. Below we provide a very brief introduction to some terms we might use during the tutorial, and a description of some basic bash commands.
Shell - a shell is a command line interpreter that provides a way for a user to interface with the operating system, typically through commands typed into a terminal. There are different types of shells.
Bash shell - a specific type of shell.
Shell script - a generic term for a script that is executed by a shell.
Bash script - a script that is executed by a bash shell. Typically starts with #!/bin/bash
Terminal - a terminal emulator allows users to access the shell.
Some basic bash commands you will need during the tutorial are shown below.
Command |
Description |
|---|---|
|
print the working directory i.e. where are you in the file tree |
|
list all the files and directories in the current directory |
|
change directory a) cd/… to back up one directory, b) cd to go to the home directory c) cd filepath to go to a specific location |
|
make a new directory |
|
copy a file to a new location add -R flag for directories - example is cp foo.txt /newfilepath/ |
|
move a file to a new location or rename a file |
|
remove a file - warning this is permanent and there are no checks |
|
create a file e.g. touch foo.txt |
|
print the contents of a file e.g. cat foo.txt |
|
print the top 10 lines of a file e.g. head foo.txt |
|
print the last 10 lines of a file e.g.tail foo.txt |
|
look at the manual / help file for a command |
There are many more exhaustive cheat sheets online should you need them.