check kernel configuration
grep CONFIG_INOTIFY_USER
/boot/config-`uname -r`|wc –l
and then download inotifywait package
#!/bin/sh
inotifywait -mrq -e create,delete
--exclude='ast-ami|swp|swx' /tmp \
| while read folder event file
do
echo "${event} ${file} from ${folder}"
done
沒有留言:
張貼留言