LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 03-17-2015, 07:33 AM   #1
anandg111
Member
 
Registered: Jan 2012
Posts: 56

Rep: Reputation: Disabled
keep watch on directory


Is there any tool or command in linux to keep watch on directory.
root user should get the report of all the changes made with files in the dir.
 
Old 03-17-2015, 07:41 AM   #2
TobiSGD
Moderator
 
Registered: Dec 2009
Location: Germany
Distribution: Whatever fits the task best
Posts: 17,133
Blog Entries: 2

Rep: Reputation: 4839Reputation: 4839Reputation: 4839Reputation: 4839Reputation: 4839Reputation: 4839Reputation: 4839Reputation: 4839Reputation: 4839Reputation: 4839Reputation: 4839
You can use inotify for that. http://man7.org/linux/man-pages/man7/inotify.7.html
 
Old 03-17-2015, 06:02 PM   #3
joe_2000
Member
 
Registered: Jul 2012
Location: Aachen, Germany
Distribution: Void, Debian
Posts: 823

Rep: Reputation: 237Reputation: 237Reputation: 237
Quote:
Originally Posted by anandg111 View Post
Is there any tool or command in linux to keep watch on directory.
root user should get the report of all the changes made with files in the dir.
What exactly do you mean with "keep watch" and "get the report"?
If you want to trigger a notification immediately after the change, inotify is the tool to use (as already suggested).

If you want to keep track of changes, version control systems such as git could be an option.
Whenever you review the status you can see exactly what changes were made since you checked last time. If you are ok with the changes, you can "save them" (referred to as committing them) which brings you to a clean status again... such that next time you check, again you'll see what changed in the meanwhile.

On the other hand, if something looks wrong, you can always revert to a previous stage...
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
inotify -cannot add a watch to newly created directory after few levels in a directoy rex1254 Linux - Newbie 5 09-11-2014 12:46 PM
Trying to watch two directory listings in the same screen, one by the side of the oth stf92 General 8 06-01-2013 06:49 AM
inotify to watch a directory then print and move algreig Linux - Newbie 4 05-25-2012 10:14 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 02:42 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration