Glossary
- -print0
- A
findaction that prints each file name followed by a null character instead of a newline. - xargs
- \copy
- The psql meta-command that moves rows between a table and a file on the machine where psql runs, here your laptop.
- psql
- `--`
- A separator on the command line. Git reads every word after it as a path, never as an option or a branch name.
- Reading history
- `<rev>:<path>`
- The file at
<path>as it was stored in commit<rev>, for exampleHEAD~2:src/config.js. - Finding things in git
- `A..B`
- The commits reachable from
Bthat are not reachable fromA.Aitself is left out. - Rebase and cherry-pick
- `stash@{n}`
- The name of an entry:
stash@{0}is the newest,stash@{1}the one before. You can also write the plain numbern. - Stash
- A record
- A DNS record that maps a name to an IPv4 address.
digasks for it when you give no type. - Network checks
- Active
- The runtime state of a unit:
activewhile the service runs,inactivewhen it is stopped,failedwhen it exited with an error. - systemctl
- Address
- The part before a sed command that picks the lines it runs on: a line number like
2, a regex like/^#/, or a range like2,4. - sed
- adjacent lines
- Lines that sit next to each other.
uniqonly merges equal lines when they are adjacent. - Sorting and counting
- aggregate function
- A function such as
count,sumoravgthat reads many rows and returns one value. - Counting in SQL
- anchor
- A part of a regex that matches a position instead of a character:
^is the start of the input,$the end and\ba word boundary. - Regex basics
- Backreference
\1or\k<name>inside a pattern. It matches the same text that a group earlier in the pattern matched.- Regex groups
- bastion
- A host that accepts SSH from outside and that you go through to reach the hosts behind it.
- ssh and scp
- bisect
- A binary search over history. You mark one commit bad and one good, and Git checks out the commit halfway between them for you to test.
- Finding things in git
- Boot
- The time between one start of the machine and the next.
-b -1means the boot before the current one,-balone the current one. - journalctl
- branch
- A name that points to one commit. Each new commit on the branch moves the name forward to it.
- Branches
- build context
- The folder you pass to
docker build.COPYcan only read files from it. - Dockerfile lines
- Capturing group
(...)in a regex. It keeps the text it matched, numbered 1, 2, 3 in the order of the opening parentheses.- Regex groups
- character class
- A set of characters that matches one character, such as
[0-9], its shorthand\d, or[^ ]for any character except a space. - Regex basics
- cherry-pick
- Git applies the change of one existing commit on top of the current branch and records it as a new commit with a new hash.
- Rebase and cherry-pick
- COALESCE
- A function that returns the first of its arguments that is not NULL, such as
COALESCE(phone, 'none'). - NULL in queries
- conflict target
- The column list after ON CONFLICT, such as
(sku). PostgreSQL uses it to pick the unique index that decides what counts as a duplicate. - Changing data
- constraint
- A rule on a column or a table that PostgreSQL checks on every insert and update, such as NOT NULL, UNIQUE, CHECK or a foreign key.
- Tables and indexes
- Container
- A process started from an image, with its own file system and a name, such as
web. It stays on disk after it stops, until you remove it. - docker
- container
- One process with its own image inside a pod. A pod with two containers needs
-cto say which one you mean. - kubectl for debugging
- CrashLoopBackOff
- The status kubectl shows for a container that keeps crashing. The kubelet waits 10 s, 20 s, 40 s and so on between restarts, up to 5 minutes.
- kubectl for debugging
- CRLF
- A line ending made of a carriage return (
\r) and a newline (\n).cutsplits lines on the newline only, so the\rstays at the end of the last field. - Cutting columns
- CSR
- Certificate signing request (PKCS#10): a file holding your public key and the subject you ask for, signed with your own private key.
- openssl for TLS
- delimiter
- The character that separates fields on a line, such as
:inpasswd.txt.cut -dsets it; the default is a tab. - Cutting columns
- Delimiter
- The character that separates the parts of
s/REGEXP/REPLACEMENT/. It is/by default and can be any other single character. - sed
- diffstat
- One line per changed file with the number of changed lines, then a summary line such as
1 file changed, 2 insertions(+). - Reading history
- Enabled
- A unit is enabled when systemd has created the symlinks listed in its
[Install]section, so it starts at boot. - systemctl
- EXCLUDED
- A special table name inside ON CONFLICT DO UPDATE. It holds the row that the INSERT tried to add.
- Changing data
- exec form
- An instruction written as a JSON array, like
CMD ["node", "server.js"]. Docker runs the program directly, with no/bin/sh -caround it. - Dockerfile lines
- Exit code
- The number curl returns to the shell when it ends.
0means the transfer worked;22means--failsaw a status of 400 or more. - curl
- field
- One column of a line. By default
sortsplits fields where blanks start;-tsets another separator. - Sorting and counting
- Field
- One piece of a line after awk splits it.
$1is the first field, and$0holds the full line. - awk
- Field separator
- What awk splits a line on. By default it is runs of spaces and tabs;
-F,sets it to a comma. - awk
- file descriptor
- A number the shell gives each open stream of a command: 0 is standard input, 1 is standard output, 2 is standard error.
- Pipes and redirects
- Filter
- The jq program you pass in quotes, like
.services[0]. It takes JSON in and gives JSON out. - jq basics
- follow
- What
tail -fdoes: it prints the last lines, then keeps the file open and prints new lines as they are appended. - Cutting columns
- foreign key
- A constraint that only lets a column hold values that exist in a column of another table, here
tickets.user_idandusers.id. - Tables and indexes
- group
- The set of rows that have the same values in the GROUP BY columns. The query returns one row per group.
- Counting in SQL
- HAVING
- A condition checked on each group after the aggregates are computed. A WHERE condition runs on each row, before the rows are grouped.
- Counting in SQL
- HEAD
- The commit you are on. On a branch, it is the newest commit of that branch, and
HEAD~2is its grandparent, following first parents. - Undoing things
- Header
- A
Name: valueline sent before the body, by the client in the request or by the server in the response. - curl
- here string
- The
<<<operator: the shell passes one word, plus a newline, to the command on standard input. - Pipes and redirects
- Image
- A read-only template with a name and a tag, such as
nginx:1.27.docker runcreates a container from it. - docker
- index
- The staging area: the snapshot of files that
git commitwill record.git addcopies a file from the working tree into it. - Seeing changes
- index
- The staging area: what the next commit will contain.
git addcopies a file into it. - Undoing things
- item
- One word
xargsreads from standard input. By default, blanks and newlines separate items, socache 1.tmpgives 2 items. - xargs
- Iterator
.[], which outputs each element of an array as a separate result..services[]gives 3 objects, one after the other.- jq basics
- job
- A command that bash started from this terminal, numbered from 1.
jobslists them and%1refers to job 1. - Processes
- join condition
- The test after ON, such as
o.customer_id = c.id. A pair of rows goes into the result when it is true. - Joins
- Journal
- The log store of systemd, written by journald. Each entry has a message plus fields;
_SYSTEMD_UNITholds the unit name. - journalctl
- JSONPath
- A path into an object’s fields, like
.status.podIP.-o jsonpathand--sort-bytake one. - kubectl get and describe
- key pair
- A private key that stays on your laptop and a public key, the same file name with
.pub, that you copy to servers. - ssh and scp
- label
- A key and value stored on an object, like
app=web. A label selector picks every object that has it. - kubectl get and describe
- layer
- The file changes one instruction adds to the image. When a layer changes, Docker rebuilds it and every layer after it.
- Dockerfile lines
- Lazy quantifier
- A quantifier followed by
?, like*?or+?. It matches as few characters as it can. - Regex groups
- LEFT JOIN
- A join that keeps every row of the left table. When no right row matches, the right columns are NULL.
- Joins
- listening socket
- A socket that waits for incoming connections on a port, like the one a database opens on 5432.
- Network checks
- local port forward
- A port on your laptop that ssh connects, through the SSH connection, to a host and port on the far side.
- ssh and scp
- match
- A line that contains the pattern. By default
grepprints every match and nothing else. - Searching text
- merge base
- The newest commit that two branches share: the point where
feature/pdfleftmain. - Seeing changes
- merged
- A branch is merged into
mainwhen its newest commit is reachable frommain, so deleting the branch loses no commit. - Branches
- meta-command
- A psql command that starts with a backslash, such as
\dt. psql runs it itself and never sends it to the server. - psql
- Method
- The verb at the start of an HTTP request: GET, HEAD, POST, DELETE. curl sends GET unless an option changes it.
- curl
- mode
- The 9 permission bits of a file: read, write and execute for the owner, for the group, and for everyone else (others).
- Permissions
- namespace
- A named group of objects in one cluster.
kubectllooks in one namespace unless you name another with-n. - kubectl get and describe
- Non-capturing group
(?:...)in a regex. It groups a part of the pattern for|or a quantifier and keeps nothing.- Regex groups
- NULL
- The marker for a missing value.
=,<>and the other comparison operators return NULL when one side is NULL, and WHERE drops a row whose condition is NULL. - NULL in queries
- null character
- The byte with value 0.
find -print0andxargs -0use it to separate file names, so a space or a newline inside a name stays part of the name. - xargs
- NULLIF
- A function that returns NULL when its 2 arguments are equal, and its first argument otherwise.
- NULL in queries
- Object construction
{...}in a filter. It builds a new object, like{name: .service}, from fields of the input.- jq transforms
- octal mode
- The mode written as digits, one per class, each the sum of read (4), write (2) and execute (1).
640isrw-r-----. - Permissions
- OFFSET
- The number of sorted rows to skip before LIMIT starts counting the rows it returns.
- SELECT basics
- OVER
- The clause right after a function that makes it a window function. Inside it, PARTITION BY and ORDER BY say which rows the function sees and in what order.
- Window functions
- partition
- The group of rows that share the same PARTITION BY value, here one per region. Without PARTITION BY, the whole result is one partition.
- Window functions
- patch
- The lines a commit added (starting with
+) and removed (starting with-), file by file. - Reading history
- pattern
- The text or regular expression
greplooks for in each line, such asERRORorWARN|ERROR. - Searching text
- pattern
- The text on the right of LIKE.
%matches any run of characters, even none, and_matches exactly one character. - SELECT basics
- Pattern
- A condition before
{...}, like$4 == 500. awk runs the action only on the lines where it is true. - awk
- Pattern space
- The buffer that holds the current line while sed runs the script on it. sed prints it at the end of each line unless you pass
-n. - sed
- peer
- A row with the same ORDER BY value as the current row, such as ids 2 and 3 with 250 each.
- Window functions
- PEM
- The text form of a certificate or key: base64 between lines like
-----BEGIN CERTIFICATE-----and-----END CERTIFICATE-----. - openssl for TLS
- pickaxe
- The
-Sand-Goptions ofgit log. They keep only the commits whose diff touches a given string or regular expression. - Finding things in git
- pipe
- The
|operator: it connects the standard output of the command on its left to the standard input of the command on its right. - Pipes and redirects
- Pipe
|inside a filter. It feeds each result of the left side into the right side, like.services[] | .name.- jq basics
- plan
- The steps PostgreSQL picks to run a query, such as a sequential scan of
ordersor an index scan.EXPLAINprints it. - psql
- Priority
- The syslog level of an entry, from 0 (
emerg) to 7 (debug).erris 3 andwarningis 4. - journalctl
- Published port
- A host port that Docker forwards to a container port.
-p 8080:80sends host port 8080 to container port 80. - docker
- quantifier
- A suffix that says how many times the item before it repeats:
+for 1 or more,*for 0 or more,{4}for exactly 4. - Regex basics
- rebase
- Git takes the commits of a branch, applies them one by one on top of another commit, and moves the branch to the last new commit.
- Rebase and cherry-pick
- reflog
- A local log of every commit
HEADpointed to, newest first, numberedHEAD@{0},HEAD@{1}and so on. - Undoing things
- remote
- A name stored in your clone for another copy of the repo, with its URL.
originis the remote thatgit clonecreates. - Remotes
- remote-tracking branch
- Your local copy of a branch on a remote, such as
origin/fix/tax-tests.git fetchupdates it. - Branches
- remote-tracking branch
- A local copy of a branch on a remote, such as
origin/main.git fetchupdates it; you do not commit on it. - Remotes
- resolver
- The DNS server that answers your lookups.
diguses the one in/etc/resolv.confunless you name another with@. - Network checks
- RETURNING
- A clause at the end of INSERT, UPDATE or DELETE that sends back columns of the rows the statement changed.
- Changing data
- revision
- A numbered version of a Deployment’s pod template. A change to the template, such as a new image, creates one; scaling does not.
- kubectl for debugging
- SAN
- Subject Alternative Name: a certificate extension that holds a list of names, such as
DNS:www.shop.example.org. - openssl for TLS
- select list
- The expressions between SELECT and FROM. Each one gives one column of the result.
- SELECT basics
- short hash
- The first few characters of a commit’s 40-character id, enough to name that commit uniquely in this repo.
- Reading history
- signal
- A numbered message the kernel delivers to a process.
killsends one; SIGTERM is 15 and SIGKILL is 9. - Processes
- SNI
- Server Name Indication: the host name the client puts in its ClientHello, the first message of the TLS handshake.
- openssl for TLS
- sort key
- The part of each line that
sortcompares, chosen with-k. Without-k,sortcompares whole lines. - Sorting and counting
- standard error
- Descriptor 2, where
./build.shwrites itserror:line.>and|leave it on the terminal unless you move it. - Pipes and redirects
- starting point
- The directory you give
findfirst, such as.orlogs. It searches that directory and everything below it. - Finding files
- stash entry
- A saved set of uncommitted changes, with a message.
git stash pushadds one and resets the working tree and the index toHEAD. - Stash
- Status code
- The three-digit number the server puts on the first line of its answer: 200 for OK, 301 for moved, 404 for not found.
- curl
- symbolic mode
- The mode written as who, an operator and letters, such as
u+xorgo-rwx. It changes only the bits it names. - Permissions
- table alias
- A short name for a table in one query, such as
cincustomers c. A self join needs two aliases for the same table. - Joins
- test
- A condition such as
-nameor-sizethat is true or false for each file.findprints a file only if every test is true. - Finding files
- transaction block
- The statements between
BEGINandCOMMIT. Some commands, such asCREATE INDEX CONCURRENTLY, refuse to run inside one. - Tables and indexes
- umask
- A mask kept by the shell. Each bit set in it is turned off on files and directories that the shell’s commands create.
- Permissions
- Unit
- One object systemd manages: a service, a timer, a socket, a mount. Its name ends with its type, as in
orders.service. - systemctl
- Unit file
- The text file that defines a unit, such as
/etc/systemd/system/orders.service, with sections like[Service]and[Install]. - systemctl
- untracked file
- A file in the working tree that was never added with
git add.git status --shortmarks it??. - Stash
- Update-assignment
|=in a filter. It runs the old value of a field through a filter and stores the result in the same place.- jq transforms
- upstream
- The remote-tracking branch a local branch is linked to. On that branch,
git statuscompares with it and a plaingit pullpulls from it. - Branches
- upstream branch
- The remote branch a local branch is linked to. A plain
git pushorgit pullon that branch uses it. - Remotes
- word character
- A letter, a digit or
_.-wuses them to decide where a word starts and ends. - Searching text