Files
shell_scripts/modified.sh
2019-08-10 09:28:27 +02:00

8 lines
275 B
Bash
Executable File
Raw Blame History

This file contains invisible Unicode characters
This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
#!/bin/bash
dir="/usr/local/etc/httpd"
name="httpd.conf"
test=$(find $dir -name "$name" -mmin -2 -maxdepth 1)
#[ ! -z $test ] && echo "$name was modified in the last 2 minutes"
[ ! -z $test ] && echo -e "\033[1;31m❗ $name was modified in the last 5 minutes\033[0m"