Linux - GeneralThis Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Distribution: Fedora x86 and x86_64, Debian PPC and ARM, Android
Posts: 4,500
Rep:
Try to be more specific. What do you mean when you say "monitor a folder for rsync"? Are you looking at the sending or the receiving side? What criteria defines a problem situation?
Rsync has it's own error detection, and will exit with an error. Why wouldn't you just check for a non-zero return code from rsync and take corrective action?
hmm.... this is how it goes...
i got 2 servers A (rsync) n B
server a will pump files to server B. here is what i wanna do..
in server b.. a script to monitor folder, to check whether server b is receiving files from rsync regularly within a 5 min interval.. if it is not... then it will pump an error log out
Distribution: Fedora x86 and x86_64, Debian PPC and ARM, Android
Posts: 4,500
Rep:
'/dev/null' is the bit bucket; anything written to it is discarded. In the above example, any messages written by the mail command are discarded by sending them to /dev/null.
The reason is that there is no email body included in the above example (just a subject). When used this way, the mail command will generate the message "No email body, I hope that's OK". Redirecting all output to /dev/null suppresses this message.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.