#!/bin/bash# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~# Identifies corrupted ZIP/JAR/WAR files.# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~if[!-z${1}];thenecho"Scanning ${1} ..."if[-d"${1}"];thenfind${1}-regex".*\.\(jar\|war\|zip\)"|xargs-L1zip-T|grep error |grep invalid
echo"Finished searching for invalid ZIP/JAR/WAR"elseecho"You need to supply a directory !"fielseecho"You need to supply a directory !"fi
#!/bin/sh# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~# Makes sure that the source directory will be synced with a target directory as long as this script keeps going.# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~FROM=${1}TO=${2}while inotifywait -r-e modify -e create -e delete ${FROM};dorsync-p-r${FROM}${TO}done