Cruxible's Journal

Cruxible's Command Vault

╔══════════════════════════════════════╗
║        CRUXIBLE COMMAND VAULT        ║
╚══════════════════════════════════════╝

Bash Commands

Find files modified within the last 24 hours

find . -type f -mtime -1

Find files larger than 100 MB

find . -type f -size +100M

Find which process is using a port

sudo lsof -i :5000

See what is listening on all TCP ports

sudo ss -tulpn

Follow a log file as it changes

tail -f /var/log/syslog

Find a command's actual executable

which python3

Find every matching command/config/file in your PATH

type -a python

Search command history

history | grep ssh

Find files containing a specific string

grep -Rni "something" .

Show directory sizes

du -sh ./*

Find the biggest things in the current directory

du -ah . | sort -h | tail -2