#logs
15 one-liners with this tag.
All one-liners tagged logs
Empty a file without deleting it
$truncate -s 0 -- /var/www/vhosts/example.com/logs/error_log
Check the Plesk installer log after a failed update
#tail -n 100 /var/log/plesk/install/autoinstaller3.log
Check whether Apache hit MaxRequestWorkers
#grep -i "MaxRequestWorkers" /var/log/apache2/error.log* | tail -20
Find permanently rejected emails in the mail log
#grep "status=bounced" /var/log/maillog | tail -n 20
Find the cause of a 502 Bad Gateway in the nginx log
#grep -E "upstream|connect\(\) failed" /var/log/nginx/error.log | tail -20
Follow Docker container logs live
#docker logs -f --tail 100 app
Follow the Apache error log in real time
#tail -f /var/log/apache2/error.log
Follow the LiteSpeed error log in real time
#tail -f /usr/local/lsws/logs/error.log
Follow the logs of all services in a Compose stack
#docker compose -f /opt/app/compose.yaml logs -f --tail 100
Follow the Plesk panel log in real time
#tail -f /var/log/plesk/panel.log
Show Docker container logs for a time range
#docker logs -t --since 2h --until 1h app
Show nginx errors of a Plesk domain (502, 504)
#tail -n 50 /var/www/vhosts/system/example.com/logs/proxy_error_log
Trace delivery for an email address in the mail log
#grep -i "info@example.com" /var/log/maillog | tail -n 50
Verify a real Googlebot via reverse DNS
$n=$(host 66.249.66.1 | awk '/pointer/ {print $NF}'); echo "PTR: $n"; host "$n"
View PHP errors in the LiteSpeed stderr log
#tail -n 50 /usr/local/lsws/logs/stderr.log