Remove files 30+ days old

#!/bin/bash
# log and delete files 30 days old
FILENAME=FILES_$(date +%Y%m%d%H%M%m).log
find . -mtime +30 -exec echo {} \; > $FILENAME
rm -rfv $(cat $FILENAME)

NGINX - To allow a specific User-Agent from one IP address only

Step 1: Define the Map BlocksAdd this configuration inside the http {} block of your /etc/nginx/nginx.conf file. This logic evaluates the in...

Mais vistos