logscript
This commit is contained in:
14
log.sh
Executable file
14
log.sh
Executable file
@@ -0,0 +1,14 @@
|
||||
#!/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
|
||||
Reference in New Issue
Block a user