file='10/07/14 09:16 /var/www/html/tomtop.com1.7/media/tmp/catalog/product/h/1/h10862-7-5d6e.jpg';
例子:^^
src=/var/www/html/tomtop.com1.7/media/test
/usr/local/bin/inotifywait -mrq --timefmt '%d/%m/%y %H:%M' --format '%T %w%f' -e modify,delete,create,attrib $src | while read file
do
fulloldfiledir=`expr substr "$file" 16 ${#file}`
relativefiledir=`expr substr "$file" 49 ${#file}`
fullnewfiledir='/sharefile/images/img2.tomtop.com'${relativefiledir}
echo $fulloldfiledir
echo $relativefiledir
echo $fullnewfiledir
mkdir -p -- "$(dirname -- "$fullnewfiledir")" && cp -Rrf "$fulloldfiledir" "$fullnewfiledir" ;
done