15 lines
377 B
Bash
Executable File
15 lines
377 B
Bash
Executable File
#!/usr/bin/env bash
|
|
|
|
LOG_DIR="/var/www/paymenter/storage/logs"
|
|
|
|
# Find newest file and show last 200 lines
|
|
latest_log=$(ls -t "$LOG_DIR" | head -n 1)
|
|
clear
|
|
if [ -n "$latest_log" ]; then
|
|
echo "Showing last 200 lines of: $latest_log"
|
|
echo "----------------------------------------"
|
|
tail -n 200 "$LOG_DIR/$latest_log"
|
|
else
|
|
echo "No log files found in $LOG_DIR"
|
|
fi
|