Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

inotify_rm_watch(2) [xfree86 man page]

INOTIFY_RM_WATCH(2)					     Linux Programmer's Manual					       INOTIFY_RM_WATCH(2)

NAME
inotify_rm_watch - remove an existing watch from an inotify instance SYNOPSIS
#include <sys/inotify.h> int inotify_rm_watch(int fd, int wd); DESCRIPTION
inotify_rm_watch() removes the watch associated with the watch descriptor wd from the inotify instance associated with the file descriptor fd. Removing a watch causes an IN_IGNORED event to be generated for this watch descriptor. (See inotify(7).) RETURN VALUE
On success, inotify_rm_watch() returns zero. On error, -1 is returned and errno is set to indicate the cause of the error. ERRORS
EBADF fd is not a valid file descriptor. EINVAL The watch descriptor wd is not valid; or fd is not an inotify file descriptor. VERSIONS
Inotify was merged into the 2.6.13 Linux kernel. CONFORMING TO
This system call is Linux-specific. SEE ALSO
inotify_add_watch(2), inotify_init(2), inotify(7) COLOPHON
This page is part of release 4.15 of the Linux man-pages project. A description of the project, information about reporting bugs, and the latest version of this page, can be found at https://www.kernel.org/doc/man-pages/. Linux 2017-09-15 INOTIFY_RM_WATCH(2)

Check Out this Related Man Page

INOTIFY_RM_WATCH(2)					     Linux Programmer's Manual					       INOTIFY_RM_WATCH(2)

NAME
inotify_rm_watch - remove an existing watch from an inotify instance SYNOPSIS
#include <sys/inotify.h> int inotify_rm_watch(int fd, int wd); DESCRIPTION
inotify_rm_watch() removes the watch associated with the watch descriptor wd from the inotify instance associated with the file descriptor fd. Removing a watch causes an IN_IGNORED event to be generated for this watch descriptor. (See inotify(7).) RETURN VALUE
On success, inotify_rm_watch() returns zero. On error, -1 is returned and errno is set to indicate the cause of the error. ERRORS
EBADF fd is not a valid file descriptor. EINVAL The watch descriptor wd is not valid; or fd is not an inotify file descriptor. VERSIONS
Inotify was merged into the 2.6.13 Linux kernel. CONFORMING TO
This system call is Linux-specific. SEE ALSO
inotify_add_watch(2), inotify_init(2), inotify(7) COLOPHON
This page is part of release 4.15 of the Linux man-pages project. A description of the project, information about reporting bugs, and the latest version of this page, can be found at https://www.kernel.org/doc/man-pages/. Linux 2017-09-15 INOTIFY_RM_WATCH(2)
Man Page

15 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

watch dog problem

please help in some times "watch dog reinit memory", and system hang SCO UNIX version 3.2.5.0 Compac Proliant ML 370 pentium 3 750 512 MB memory 9g and 18g scsi u/f/w Disc 65 user running informix Thanx (1 Reply)
Discussion started by: RoMaGo
1 Replies

2. Shell Programming and Scripting

Polling/Interrogate Directory Questions

Hello, need some ideas on the control statement for a script that will watch a directory, looking for any duplicate records as they are added. I was thinking about a process that would watch the dir in a time window. Whenever a new line or entry was made I would grep the existing file for any... (1 Reply)
Discussion started by: dnidiffer
1 Replies

3. UNIX for Dummies Questions & Answers

Linux watch command on AIX?

On Linux I could use the `watch` command to loop a command X times. Is there a similar command on AIX? If not, is there a way to write a loop on the command line to do this? Linux: watch -d -n 60 'db2 list applications show detail | grep Connect | wc -l' AIX: ??? (2 Replies)
Discussion started by: djschmitt
2 Replies

4. Programming

How to watch for file creation/deletion?

How do I write a C program that will watch a directory for file creation/deletion? Maybe it would receive a signal when someone creates a file? thanks, Siegfried (5 Replies)
Discussion started by: siegfried
5 Replies

5. UNIX for Dummies Questions & Answers

Which log files to watch for size?

I'm rusty with unix admin, and I was just informed by a peer in another city that I need to watch my unix log files for size, but she never told me which ones to watch - and of course, now she's gone for two weeks! I am using Sco OpenServer 5.5 (I believe), can anyone tip me off on the trouble log... (3 Replies)
Discussion started by: citygov
3 Replies

6. Shell Programming and Scripting

Editing 1st or nth column

Hi, I have a file whick is pipe delimited : 100| alpha| tabgo|watch| |||| 444444 | alpha| tabgo|watch| |||| 444444 | sweden |tabgo|watch| |||| 444444 | US| tabgo|watch| |||| 444444 100| factory| tabgo|watch| |||| 444444 | ABC| tabgo|watch| |||| 444444 | launch| tabgo|watch| ||||... (4 Replies)
Discussion started by: darshanw
4 Replies

7. UNIX for Dummies Questions & Answers

File access tracing

Hello.. Is there anyway to check if some processes are reading one file? Id use inotify, but my kernel is 2.6.9, so it doesnt work. -k- (2 Replies)
Discussion started by: Kimmo_
2 Replies

8. Shell Programming and Scripting

KSH Script to watch log files for 2 strings

Hi all, How can I do a ksh script to watch a log file for 2 specific alarms that have one this string : "Connection Error" and the other one: "Failure in sending". I would like to watch for these two alarms in the log and then if each of them repeats for about 30 times to go kill 2 processes. ... (1 Reply)
Discussion started by: Pouchie1
1 Replies

9. What is on Your Mind?

Did you watch Super Star (Thalaivar's) Endhiran Movie?

Robot fever is there throughout the world ! :b: (3 Replies)
Discussion started by: matrixmadhan
3 Replies

10. Debian

Help

I have two questions is there a plug-in so i can watch youtube and other such embedded video? and i have a duel set up is there a way i can access my Linux side files whilst in Windows?? thanks (6 Replies)
Discussion started by: syco__
6 Replies

11. Shell Programming and Scripting

Watch a directory for new files

In Solaris, and other distros without the "watch" command, use the following code watch for files added to a directory. #!/bin/bash while ; do watchdir=/var/tmp newfile=$watchdir/.newer touch $newfile find $watchdir -newer $newfile; touch -a -m $newfile; ... (10 Replies)
Discussion started by: os2mac
10 Replies

12. UNIX for Advanced & Expert Users

Dynamically add paths to inotify

I have initiated an inotify process with --fromfile option and the file contain the paths to be monitored. /usr/local/maldetect/inotify/inotifywait -d -r -o /usr/local/maldetect/inotify/inotify_log --fromfile /usr/local/maldetect/sess/inotify.paths.28364 --exclude (^/var/tmp/mysql.sock)... (2 Replies)
Discussion started by: anil510
2 Replies

13. Shell Programming and Scripting

Hotfolder with inotify-tools, loop FOR not working

I can not understand why this little script with a loop processes only one file. At boot in /etc/rc.local i wrote: /usr/local/bin/./myscript & This is myscript: #!/bin/bash while inotifywait -e create /HOTFOLDER/ ; do for fullname in /HOTFOLDER/*.xlsx; do if !... (22 Replies)
Discussion started by: pasaico
22 Replies

14. Shell Programming and Scripting

Watch problem

These run individually, but not together. I want to show both temp and fan speed. watch -n 0.2 "sensors -f | grep "temp4"" watch -n 0.2 "sensors -f | grep "fan1"" (4 Replies)
Discussion started by: drew77
4 Replies

15. Red Hat

Issues installing inotify-tools on RedHat Linux

I wish to install inotify-tools-3.20.1-2.4.x86_64.rpm on Linux and fire inotifywait command. Initially i was looking for "inotify-tools-3.xx.tar.gz" as instructed here http://jensd.be/248/linux/use-inotify-tools-on-centos-7-or-rhel-7-to-watch-files-and-directories-for-events I have... (9 Replies)
Discussion started by: mohtashims
9 Replies