gdtyra

Command Reference

tar - manipulate tar files

find - find files and directories matching criteria

xargs - treat input as arguments to a command

basename and dirname - remove prefix and suffix from file paths

sed - manipulate text line-wise

tr - delete or replace characters

cmp - compare files byte-wise

pr and paste - join files column-wise

comm - some set operations on sorted files

dd - read and write files or devices byte-wise

sudo - execute commands as a different user

kill and pkill - terminate processes or send signals

Other signals

kill is most commonly used with the TERM and KILL signals, but there are others that a given process may or may not respond to:

The stat command is not compatible between Linux and BSD / macOS, unfortunately, so readlink may be a better option for the specific use case of resolving a link to its target.

tcpdump - capture network traffic

dig - DNS lookup

nc - read and write TCP/UDP connections

tail - print and follow ends of files

mount - manage mounted filesystems

mkfs - family of commands for formatting storage

watch - run a command repeatedly to observe changes

rsync - copy and mirror directory structures

If / is placed at the end of the source folder, rsync will copy only the content of the folder. Otherwise, it will copy the folder itself. Similarly, if / is placed at the end of the destination folder, rsync will paste the data directly inside the folder. Otherwise, it will create a folder with that name and copy into it.

git - the only source control anyone cares about anymore

go - for the very limited golang exposure I have

cmake - the closest thing to a standard C/C++ build system

winget - Windows has a package manager, too

npm - because I can't avoid it these days

docker - work with containers

python and pip

pacman - Arch linux package manager

apt - More common package manager

ruby - using Ruby for one-liners

Ruby has command-line options that make it useful for writing inline scripts as an alternative to sed or awk.

ffmpeg - media encoding

robocopy - somewhat like rsync for Windows

aws - AWS CLI commands I need to remember

jq - transform and filter JSON

column - print tabular data

wget - download files over HTTP

curl - download or make various requests over HTTP

socat - cat for sockets

ss - investigate socket usage

xsel - access X11 clipboard from terminal

Miscellaneous