patch

Updated: 24 October 2025

Apply a diff file to an original. Examples from here

Update file1.txt to make it identical to file2.txt

echo 'Hello, World!' > file1.txt
echo 'Hello, Linux!' > file2.txt
diff -u file1.txt file2.txt > file.diff
patch file1.txt < file.diff

tee

Updated: 04 October 2025

Read from standard input and write to standard output and files.

Find, from the root, all directories with ‘vim’ in their name. Send all non-error output simultaneously to std-out and a file

find / -type d -iname '*vim*' 2> /dev/null | tee find-results.txt

diff

Updated: 26 February 2024

Compare two files ignoring spaces and tabs (but not newlines, seemingly)

diff -w file1.csv file2.csv

Compare two directories

diff --brief --recursive ~/Desktop/bu ~/docs

uname

Updated: 07 October 2025

uname – print system information.

Print the machine hardware name

uname -m

Print the kernel name

uname -s

An example with all options

# -s, --kernel-name
printf '\nkernel name\n'
uname -s

# -n, --nodename
printf '\nnetwork node hostname\n'
uname -n

# -r, --kernel-release
printf '\nkernel release\n'
uname -r

# -v, --kernel-version
printf '\nkernel version\n'
uname -v

# -m, --machine
printf '\nmachine hardware name\n'
uname -m

# -p, --processor
printf '\nprocessor type\n'
uname -p

# -i, --hardware-platform
printf '\nhardware platform\n'
uname -i

# -o, --operating-system
printf '\noperating system\n'
uname -o