- How do I find all files containing specific text?
grep -rnw '/path/to/somewhere/' -e 'pattern'
- How i change the default file permissions (mask that controls file permissions)
umask
tar -zxvf archive.tar.gz
- Copy files via rsync from one host to another
rsync -av [USER@]HOST[:PORT]/SOURCE [USER@]HOST[:PORT]/DEST
- nslookup missing? Install dig
sudo apt-get install dnsutils
- find without “Permission denied”
find / -name 'filename.ext' 2>&1 | grep -v "Permission denied"
sudo systemd-resolve --flush-caches
netstat -tulpn
du -sh /var
du -shc /var/*
du -h --max-depth=1 /var
du -sh /var/lib/docker/containers/*/*.log
- Search multiple PDF files for a “needle”
pdfgrep -i needle haystack*.pdf
- Show hidden files with ls
ls -lar