#!/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 300 lines of: $latest_log" echo "----------------------------------------" tail -n 300 "$LOG_DIR/$latest_log" else echo "No log files found in $LOG_DIR" fi