Reference list

Helpful references

Unix Commands

$(CMD):

Command substitution

$?:

Get exit code from last command

$VAR:

Get value of variable

aclocal:

Generate M4 library necessary for processing configure.ac

autoconf:

Generate a project configuration script by processing configure.ac

autoheader:

Generate a config.h.in by processing configure.ac

automake:

Generate Makefile template(s) by processing configure.ac and Makefile.am (s)

bg:

Place suspended command into background

cat:

Concatenate files and print the result (or print a single file)

cd:

Change the working directory

CMD1; CMD2:

Delimit commands

CMD1 | CMD2:

Pipe output from one command into the input of another

CMD &:

Run command in background

CMD >FILE:

Redirect output from command to file

CMD <FILE:

Use contents of file as input to command

configure:

A script generated by autoconf; inspects system, and generates config.h and Makefile (s)

cp:

Copy a file

Crtl-R:

Search for previous command in history

Ctrl-Z:

Suspend command running in foreground

echo:

Display given text

env:

Display the current environment variables

export VAR:

Mark variable as exportable to the environment of run commands

fg:

Bring background command into foreground

find:

Search for files in a directory hierarchy

(gdb) ba:

Print a backtrace

(gdb) break:

Set a break point

(gdb) continue:

Continue execution after breaking

(gdb) disassemble:

Disassemble a block of instructions

(gdb) print:

Print a value

(gdb) quit:

Quit

(gdb) run:

Run program you have loaded in GDB

(gdb) stepi:

Step forward one instruction

(gdb) x:

Examine the contents of memory

git add:

Designate one or more files as part of the next commit

git clone:

Make a local copy of a Git repository

git commit:

Perform a commit and record an associated message

git diff:

Display the changes made since the last commit

git log:

Print the history of commits to a project

git push:

Push committed changes back to the original repository

git reset:

Reset Git repository to a previous state

grep:

Print only lines that match a regular expression

gzip:

Compress a file

history:

Display the command history

history:

Print command history

if CMD1; then CMD2; fi:

Conditional

ls:

List directory contents

mail:

Send and receive Internet mail

make:

Build and otherwise maintain groups of programs

man:

Display a Unix manual page

mkdir:

Create a directory

mv:

Move (rename) a file

nc (netcat):

Concatenate and redirect sockets

objdump:

Display information about object files, including disassembly

openssl genrsa:

generate an RSA private key

openssl req:

process X.509 certificate-signing requests

openssl x509:

process X.509 certificates

podman build:

Build a container image defined by a Dockerfile

podman images:

List the container images on the local host

podman pull:

Pull a container image from a known repository

podman run:

Establish a container and load an image

ps:

Display the current processes

pwd:

Print working directory

rmdir:

Permanently remove an empty directory

rm:

Permanently remove a file

sed:

Stream editor for filtering and transforming text

sleep:

Delay for a specified amount of time

sudo:

Execute a command as another user

su:

Switch user

tar:

Capture output of command into variable

troff:

process troff markup to generate a document

Up/Down Arrow:

Recall previous commands

VAR=$(CMD):

Capture output of command into variable

VAR=VAL:

Set value of variable

wc:

Count the lines, words, or characters in a file

wget:

Download a file identified by a Uniform Resource Locator (URL)

while CMD1; do CMD2; done:

Loop

*:

Wildcard

C Elements

argc:

An integer indicating the number of command-line arguments received by the program

argv:

An array of pointers to the program’s command-line arguments

char:

A single-byte type capable of holding a character, e.g., ‘a’, ‘g’, or ‘Z’

else:

Execute the following block when the previous if did not execute

float:

A floating-point type that approximates a real number

foo[n] = 42:

Set the nth element of the array foo to the value 42

for:

Iterates until a condition is no longer met

for:

Loop with initialization, condition, and increment

if:

Conditionally execute the following block

int:

An integer type from -n to n-1

||:

The logical-or operator

>:

The greater-than operator

>=:

The greater-than-or-equal operator

<:

The less-than operator

<=:

The less-than-or-equal operator

t foo[] = { 1, 2, 3, 4, 5 }:

Create an array named foo with given values

t foo[n]:

Create an array named foo of n objects of type t

+:

The addition operator

=:

The assignment operator

/:

The division operator

==:

The equality operator

!=:

The inequality operator

&&:

The logical-and operator

!:

The logical-negation operator

%:

The modulus (remainder) operator

*:

The multiplication operator

-:

The subtraction operator

while:

Repeat the following block as long as a command succeeds

Go Elements

char:

A single-byte type capable of holding a character, e.g., ‘a’, ‘g’, or ‘Z’

else:

Execute the following block when the previous if did not execute

float:

A floating-point type that approximates a real number

for:

Establish a loop

for:

Iterates until a condition is no longer met

if:

Conditionally execute the following block

int:

An integer type from -n to n-1

os.Args:

A slice of command-line arguments

||:

The logical-or operator

>:

The greater-than operator

>=:

The greater-than-or-equal operator

<:

The less-than operator

<=:

The less-than-or-equal operator

+:

The addition operator

=:

The assignment operator

/:

The division operator

==:

The equality operator

!=:

The inequality operator

&&:

The logical-and operator

!:

The logical-negation operator

%:

The modulus (remainder) operator

*:

The multiplication operator

-:

The subtraction operator

Java Elements

a.length:

The length of the array a

args:

An array of command-line arguments

char:

A single-byte type capable of holding a character, e.g., ‘a’, ‘g’, or ‘Z’

double:

A floating-point type that approximates a real number

else:

Execute the following block when the previous if did not execute

foo[n] = 42:

Set the nth element of the array foo to the value 42

for:

Iterates until a condition is no longer met

for:

Loop with initialization, condition, and increment

if:

Conditionally execute the following block

int:

An integer type from -n to n-1

int foo[] = { 1, 2, 3, 4, 5 }:

Create an array named foo with given values

java.net.Socket:

A client socket class able to send or receive communication messages

JButton:

A button widget that reacts to clicks or presses

JFrame:

A window

JLabel:

Display area for a short text string, an image, or both

JPanel:

Generic lightweight container

JTextField:

A field that accepts text input

Math.PI:

An approximation of the value of π

||:

The logical-or operator

>:

The greater-than operator

>=:

The greater-than-or-equal operator

<:

The less-than operator

<=:

The less-than-or-equal operator

t foo[] = new t[n]:

Create an array named foo of n objects of type t

+:

The addition operator

=:

The assignment operator

/:

The division operator

==:

The equality operator

!=:

The inequality operator

&&:

The logical-and operator

!:

The logical-negation operator

%:

The modulus (remainder) operator

*:

The multiplication operator

-:

The subtraction operator

Timer:

A timer that produces an action event when it expires

while:

Repeat the following block as long as an expression evaluates to true

Python Elements

elif:

Conditionally execute the following block, but only when the previous if did not execute

else:

Execute the following block when the previous if did not execute

for:

Execute command for each element in list

for:

Iterates over the elements of a sequence

if:

Conditionally execute the following block

sys.argv:

An array of command-line arguments

||:

The logical-or operator

>:

The greater-than operator

>=:

The greater-than-or-equal operator

<:

The less-than operator

<=:

The less-than-or-equal operator

+:

The addition operator

=:

The assignment operator

/:

The division operator

==:

The equality operator

!=:

The inequality operator

//:

The integer division operator

&&:

The logical-and operator

!:

The logical-negation operator

%:

The modulus (remainder) operator

*:

The multiplication operator

-:

The subtraction operator

while:

Repeat the following block as long as a command succeeds

C Functions

connect:

Connect a socket to an address

execvp:

Execute a file

exit:

Terminate the current process

fork:

Create a new process by duplicating the calling process

freeaddrinfo:

Free the address object provided from a getaddrinfo call

gai_strerror:

Print the error string associated with a failed getaddrinfo call

getaddrinfo:

Obtain one or more addresses for a host

isalpha:

Determine whether the given value represents an alphabetic character

printf:

Print to standard output with formatting

recv:

Receive a message from a connected socket

scanf:

Read formatted values from standard input

socket:

Return a socket abstraction able to send or receive communication messages

strcmp:

Compare two strings

strstr:

Search for the occurrence of one string in another

tolower:

Convert a capital letter to lower-case; return lower-case letter unchanged

wait:

Wait for a child process to stop or terminate

Go Functions

bufio.NewReader:

Create a buffered reader from a non-buffered reader such as a connection

bufio.Reader.ReadString:

Read up to and including the first occurrence of a delimiting string

fmt.Printf:

Print to standard output with formatting

fmt.Println:

Print to standard output

fmt.Scanf:

Read formatted values from standard input

net.Dial:

Create a connection to the given address

Java methods

Character.isLetter:

Determine whether the given value represents an alphabetic character

Character.toLowerCase:

Convert a capital letter to lower-case; return lower-case letter unchanged

java.util.Scanner:

Read values from text

Math.pow:

Raise one value to the power of another

Scanner.nextLine:

Read a line from standard input, but drop the terminating newline

String.contains:

Search for the occurrence of one string in another

String.equals:

Compare two strings

System.out.printf:

Print to standard output with formatting

System.out.println:

Print to standard output

Python Functions

context.connect:

Establish a TLS connection using the context’s underlying socket

context.load_cert_chain:

Load a certificate chain for client-side authentication

context.recv:

Receive bytes from TLS connection

context.sendall:

Send bytes on TLS connection

context.wrap_socket:

Wrap a socket in a TLS session

print:

Print to standard output

socket.socket:

Return a socket abstraction able to send or receive communication messages

SocketType.connect:

Connect a SocketType object to an address

SocketType.recv:

Receive a message from a connected SocketType object

ssl.create_default_context:

Create a new SSL (TLS) object context with the given settings

References