bin/lnav-forwarded-logs

11 lines
241 B
Plaintext
Raw Normal View History

2023-06-04 00:02:02 +02:00
#!/usr/bin/env bash
FORWARDED_LOGS=$(sudo find /var/log -type f -name "forwarded-logs.log")
if [[ -n "$FORWARDED_LOGS" ]]; then
echo "$FORWARDED_LOGS" | xargs sudo lnav
else
echo "No forwarded logs found in /var/log"
exit 1
fi