๐งน Find and delete all empty directories
find . -type d -empty -delete
filescleanupfind
A practical collection of Bash, Zsh, Linux, Unix, Git, log, and networking snippets.
find . -type d -empty -delete
du -ah . | sort -rh | head -n 10
rename 's/\.txt$/\.md/' *.txt
cp file.txt{,.bak}
sort file.txt | uniq -c | sort -nr
tail -f access.log | grep --color=always "Error"
awk '!visited[$0]++' file.txt
sed -i 's/old/new/g' *.txt
lsof -i :8080
history | awk '{print $2}' | sort | uniq -c | sort -rn | head -10
python3 -m http.server 8000
curl ifconfig.me
git branch | grep -v "main" | xargs git branch -D
grep -rnE "search_phrase" .
npm cache clean --force
sudo !!
ls -la | tee list.txt
mkdir -p project/{src,bin,doc,tests}
pkill -f process_name
stat -c "%a %n" *
sudo ss -tulpn
curl -s https://ifconfig.me
mtr google.com
ip -brief address show
nc -zv 192.168.1.1 80
nmap -sn 192.168.1.0/24
arp -a
dig google.com ANY +noall +answer
ip route show
sudo tcpdump -A -s 0 'tcp port 80'
nload eth0 # or iftop
sudo nethogs
curl -I https://google.com
python3 -m http.server 8000
curl -O https://example.com/file.zip
sudo ip link set eth0 down && sudo ip link set eth0 up
sudo resolvectl flush-caches
ip route | grep default
netstat -i
whois 8.8.8.8