4 ms·
Unix How-To: File Updates in Linux
- nailer 17y agoThe 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 17y agoIt 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 17y agoCool 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.