Rapid fire: one-liners for files and housekeeping.
BeginnerConceptBest practices and rapid-fire commands
Answer
find /var/log/app -name '*.log' -mtime +14 -delete
find / -xdev -type f -size +1G -exec ls -lh {} + 2>/dev/null
tar -czf "backup-$(date +%F).tar.gz" -C /etc nginx
sha256sum -c SHA256SUMS
rsync -a --delete --dry-run src/ dst/ # preview a mirror
ls -1t /var/backups/*.tar.gz | tail -n +8 # all but the newest 7 (simple names only)
stat -c '%U:%G %a %n' /etc/opskit/opskit.conf
install -d -m 0750 -o app -g app /srv/app/shared
More on Best practices and rapid-fire commands
What does a production-ready script template look like?AdvancedWhat logging practices do you follow in automation scripts?IntermediateHow do you make a script support a dry-run mode cleanly?BeginnerRapid fire: one-liners for disk, memory and process checks.BeginnerRapid fire: one-liners for logs and text.BeginnerRapid fire: one-liners for JSON, YAML and cloud CLIs.Beginner