This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /bin/bash | |
scriptdir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" | |
cd $scriptdir | |
source variables.conf | |
function init(){ | |
echo "Init" | |
mkdir -p $BACKUP/mysql | |
echo "Done!" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /bin/bash | |
# only work on files older then $days | |
days=7 | |
# look for files in this directory | |
logDir="/var/log/apache2/" | |
# with this extension | |
extension="*.gz" | |
# depersonalize by replacing the last two bytes of an IP with this string | |
anoBytes=".0.0" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function readCommand(){ | |
lastCommand=$1 | |
read -t.1 -n1 c; | |
if [ "$c" = "p" ] | |
then | |
printf "\n\r"; | |
return 0 | |
fi | |
if [ "$c" = "g" ] | |
then |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /bin/bash | |
_space_="\ *"; | |
type="."; | |
perm="[^\ ]*"; | |
hlinks=$perm; | |
user=$perm; | |
group=$perm; | |
size=$perm; | |
modified=".{12}"; |