Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

I have a server online and I am wondering if there's a way to know if some file on the server is modified or a new file is added to certain directories.

For example, I have this public_html/myblog/files

this directory contains several files. What I want is to be notified by email if one of the current files inside that directory is modified or if a new file is added to that directory. If possible to receiving a message telling me what files are new or were modified.

Is this possible? I am using CentOS 6.8

thanks.

share|improve this question
add comment

2 Answers

up vote 2 down vote accepted

use dnotify or inotify see this .

see this stackoverflow post.

share|improve this answer
    
great!!!!! thanks! –  Digital Robot Jan 13 '13 at 21:10
add comment

Tripwire is what you're looking for. Check this post: http://lists.centos.org/pipermail/centos/2006-June/023655.html

Tripwire will email you if a file or directory that is configured to be watched changes.

share|improve this answer
    
thanks!!!!!!!!!! –  Digital Robot Jan 13 '13 at 21:11
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.