how can i get alert when a file are folder get updated in segate network drive
Linux - ServerThis forum is for the discussion of Linux Software used in a server related context.
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.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
how can i get alert when a file are folder get updated in segate network drive
Hi
i have a segate network hard drive accessed by 1500 user and i have admin user login in network drive get shared for all user in network for accessing softwares and important creditential . I want to automatically run a script whenever new files are copied into a particular directory. In other words, is there a way in Linux to "watch" a directory for changes and then run something in response to the change?
Regards
arun
Last edited by jsaravana87; 09-23-2011 at 09:17 AM.
If I understand correctly, you want the update of a file in a known directory to trigger an email alert to known users.
You can write a script using 'inotifywait' that will monitor the directory and send the email alert.
This link may be of use. http://www.infoq.com/articles/inotif...ent-monitoring
i had mounted my network drive in /net folder
mkdir /netdrive
mount -t cifs //19.12.25.32/servers/$(hostname) /netdrive -o username=tech,password=scripts
how can i read name of a folder and file in /net directory
Regards
arun
Last edited by jsaravana87; 09-23-2011 at 08:39 AM.
i had mounted my network drive in /net folder
mkdir /netdrive
mount -t cifs //19.12.25.32/servers/$(hostname) /netdrive -o username=tech,password=scripts
how can i read name of a folder and file in /net directory
Did you not read post #2 from allend?? The solution is there...use inotifywait, or write your own shell script to periodically look at the contents of a directory, and do whatever you wish.
Doesn't matter if it's a network drive, local storage, or USB attached...it's all just a mount point, and your scripts treat it as such.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.