chmod -R a+rX pathLinux
67 commands across 19 tools
chmod
chmod +x filechmod 644 file
chown
sudo chown -R user:group path
curl
curl -fLO https://example.com/file.tar.gzcurl https://example.comcurl -s -o /dev/null -w '%{http_code}\n' https://example.comcurl -H 'Content-Type: application/json' -d 'json' https://example.com/apicurl -d 'name=bob' https://example.com/formcurl -sSL -D - -o /dev/null https://example.com
df
df -hdf -i
du
du -ah -t 1G .du -ah . | sort -rh | head -n 20du -h --max-depth=1 . | sort -h
find
Delete empty files and directories
Destructivefind path -empty -delete -printfind . -type d -iname '*cache*'find . -type f -name '*.log'find / -type f -size +1G 2>/dev/nullfind . -type f -mtime -1find . -name '*.py' -not -path '*/node_modules/*'find . -type f -size +500k -size -10M
free
free -h
grep
grep -v "pattern" filegrep -o "pattern" filegrep -F "text" filegrep -n "pattern" filegrep -rnI "pattern" .grep -C 3 "pattern" file
ip
ip -br addr
journalctl
Delete old journal logs
Cautionsudo journalctl --vacuum-time=2djournalctl -u service -fjournalctl -n 100 -fjournalctl -b -1 -p errjournalctl --since "1 hour ago" --until "now"
lsof
sudo lsof -i :8080
pgrep
pgrep -af pattern
rsync
rsync -a source destinationrsync -a source/ destinationrsync -a -e 'ssh -p 2222' source user@host:destinationrsync -azhP source destinationMirror a directory, deleting extra files
Destructiversync -a --delete source/ destinationrsync -av --dry-run source destination
ss
ss -ltn src :8080sudo ss -tulpnss -tn src :443
ssh
ssh -J user@jump_host user@hostssh user@hostssh -i ~/.ssh/id_ed25519 user@hostssh -L 8080:localhost:80 -N user@hostssh -D 1080 -N user@host
ssh-copy-id
ssh-copy-id -i ~/.ssh/id_ed25519.pub user@host
systemctl
systemctl status servicesudo systemctl enable --now servicesystemctl --failedsystemctl list-units --type=service --state=runningsudo systemctl daemon-reloadRestart a systemd service
Cautionsudo systemctl restart servicesystemctl cat service
tail
tail -f /var/log/syslog
tar
tar -czf archive.tar.gz -C path .tar -czf archive.tar.gz pathstar -xvf archivetar -xf archive -C pathtar -tvf archive