
Unix How-To: File Updates in Linux - abennett
http://www.itworld.com/operating-systems/104353/unix-how-to-file-updates-linux
======
nailer
The python function also has a stat, in os somewhere I believe. If you want to
see when these things change -eg, when a file is modified, you can use
pyinotify.

~~~
wendroid
It would be a sad day if your programming language didn't have stat.

Inotify is only present if your Linux-kernel is compiled with it turned on. If
you want to use it in shell scripts there's inotify-tools (that's the Debian
name anyway). Sadly GNU got their grubby fingers in and invented the stupid
D-BUS.

In FreeBSD there's kqueue which does a similar job.

~~~
nailer
Cool re: kqueue, I'll have to check that out. You don't know if there's an
equivalent for Solaris 8 by chance?

DBus is in RHEL and Ubuntu, that covers most Linux OSs.

DBus is a publish subscribe mechanism used as a kind of IPC, inotify is a way
of registering interest in an inode to avoid having to do filly things like
polling a file continually.

~~~
wendroid
No idea about Solaris, but I'm sure there is a file notification system there
too.

Not all Kernels are stock

USE="-dbus -hal"

and that's the way I likes it.

~~~
nailer
Sure, but you know you removed them, so you know you can't use them. Everyone
else who didn't can expect them.

