Updated: 04 November 2025
Install on Linux
snap install yq
Convert yaml to json
yq --input-format yaml --output-format json read_me.yml
Freelance software engineer United Kingdom
Updated: 04 November 2025
Install on Linux
snap install yq
Convert yaml to json
yq --input-format yaml --output-format json read_me.yml
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
Updated: 03 September 2025
Change the file extension on all .csv files in the current dir to .txt
rename 's/\.csv$/\.txt/' *.csv
Updated: 05 July 2025
Download a file
wget https://code.jquery.com/jquery-3.6.0.min.js
Download a file and rename
wget -O min.js https://code.jquery.com/jquery-3.6.0.min.js
Updated: 23 September 2024
Build and execute command lines from standard input.
Display the contents of all files called conn.cfg.php
find . -name 'conn\.cfg\.php' | xargs cat
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
Updated: 28 June 2023
Copy files (often just compiled) into destination locations, setting attributes.
install my_util /home/alice/.local/bin/my_util
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
Updated: 23 May 2023
Send a signal to a process. The default signal for kill is TERM.
Kill a process
kill <process id>