09-28-2001
auto update on directory change
Hi all!
Recently I've started to develop a small program that needs to
check for the arrival of files in a pre-determined directory.
I could use a timer to check for changes in this directory every n seconds.
Instead, what I'm really looking for is for some kind of notification mechanism from the OS. I want the application to register for notifications from the OS for any changes in the directory the application is "listening" for.
Any ideas how I could implement this?
Thanks in advance, regards,
Bruno
8 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
Hello,
Is it possible to make a file manager use different "colored folders" when browsing specific directories?
For example, if I open a gnome file manager and browse my windows share at, smb://192.168.1.101/z/ , can I make those folders appear green?
And when I open another instance of... (0 Replies)
Discussion started by: bz43
0 Replies
2. Web Development
is there any way to auto update html page.
I created html page entry.html, whenever i change in html script i need to refresh my page.
If not in html, can we do this in any other language and how? (2 Replies)
Discussion started by: RohitKJ
2 Replies
3. UNIX for Dummies Questions & Answers
Hi there,
I've been looking all day, but could not find anything helpfull, so I hope you can help me.
When my system now starts up, the Xwindow is automaticly started and i get the log on screen (which is x screen 7 if I'm correct)
Now what I would like is on startup that instead of going to... (1 Reply)
Discussion started by: Wonderke
1 Replies
4. Windows & DOS: Issues & Discussions
I want to allow windows update when ordinary users are logged on, I'm pretty sure that adjusting the permissions registry entry HEY_LOCAL_MACHINE/SOFTWARE/Microsoft/Windows/CurrentVersion/WindowsUpdate to allow acces to all domins users does the trick.
I already have a logon.bat that runs at... (0 Replies)
Discussion started by: barrydocks
0 Replies
5. UNIX for Advanced & Expert Users
Hello - Is this possible on Unix machines? Can we update user password change time? (6 Replies)
Discussion started by: manju--
6 Replies
6. UNIX for Dummies Questions & Answers
We have a version for every file like RHZ 1.0 / Ver 1.4.2 etc.
Whenever I place a new file with same file name i want the version to get auto upgraded. So can anyone suggest code..
Eg:
RHX 1.0 -> RHZ 1.1
Ver 1.4.2. -> Ver 1.4.3 (1 Reply)
Discussion started by: krishna87
1 Replies
7. Shell Programming and Scripting
I am trying to do the following task :
export ENV=aaa
export ENV_PATH=$(cd /apps | ls | grep $ENV)
However, it's not working. What's the way to change to directory and search some file in that directory in single command
Please help. (2 Replies)
Discussion started by: saurau
2 Replies
8. Shell Programming and Scripting
Hi,
I am newbie to Linux/Asterisk. I am trying to write a shell script that would look for my SIP trunk registration, if found UNREACHABLE then it would execute a command and check my local IP, if my local IP is 192.168.1.106 then it would change the IP to 192.168.1.150 and vice versa, after... (8 Replies)
Discussion started by: jeetz
8 Replies
LEARN ABOUT DEBIAN
update-service
update-service(8) System Manager's Manual update-service(8)
NAME
update-service - add/remove a service to/from system-wide service supervision
SYNOPSIS
update-service --add|--remove service-directory [service-name]
update-service --list|--check [service-name]
DESCRIPTION
service-directory must be a directory to be used by supervise(8), service-name must not start with a dot, and must not contain a slash.
update-service adds or removes the service-directory to the system-wide service supervision provided through daemontools' svscan(8), lists
all registered system-wide services, or checks for a specific service-name whether it is registered.
When adding a service, and the service-directory resides in /etc/, update-service makes sure that the ./supervise/ subdirectories in the
service-directory, and the optional service-directory/log/, are symbolic links pointing into /var/lib/supervise/, unless they already are
symbolic links.
OPTIONS
--add | -a
Add the service directory service-directory to the system-wide service supervision, under the name service-name. If service-name is
not specified, update-service will use the basename of service-directory. You can use the svc(8) program to control the newly added
service, and the svstat(8) program to query its status, e.g.:
# svstat /etc/service/service-name
--remove | -r
Remove the service directory service-directory, which has been added under the name service-name, from the system-wide service
supervision. If service-name is not specified, update-service will use the basename of service-directory. When removing the ser-
vice-directory, the exit command is sent to the corresponding supervise(8) process, telling it to take the service down and exit
afterwards. You can use the svc(8) and svstat(8) programs to control the removed service, or query its status, e.g.:
# svstat service-directory
--list | -l
If service-name is specified, update-service checks whether service-name is registered as system-wide service, prints a message and
exits non-zero if not, or prints the service-name and the directory it points to and exits zero if yes. If service-name is not
specified, it prints the names of all system-widely registered services, one per line.
--check | -c
The same as --list, but update-service doesn't print anything to standard out or standard error.
ENVIRONMENT
SVDIR The environment variable $SVDIR overrides the default services directory /etc/service/.
FILES
/etc/service/
SEE ALSO
svc(8), svstat(8), svscan(8), svscanboot(8)
AUTHOR
Gerrit Pape <pape@smarden.org>
update-service(8)