How to tell when a file is read from disk or cache?

Reindl Harald h.reindl at thelounge.net
Sat Nov 17 17:34:16 UTC 2012


Am 17.11.2012 18:29, schrieb Joachim Backes:
> On 11/17/2012 05:15 PM, Philip Rhoades wrote:
>> People,
> 
>> Is there some way of doing this? - even for a simple situation like
>>  opening a text file in Vim?
> 
> Perhaps this helps? See the following manpages:
> 
> Inotify			(7)	monitoring file system events
> inotify_add_watch	(2)	add a watch to an initialized inotify
> 				instance
> inotify_init		(2)	initialize an inotify instance
> inotify_init1		(2)	initialize an inotify instance
> inotify_rm_watch	(2)	remove an existing watch from an
> 				inotify instance

unlikely

that a file is changed or written does not say anything
about the state on disk, buffering/caching is transparent

inotify does not tell you anything at all about the OP's
question which hs the the simple answer "no"

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 261 bytes
Desc: OpenPGP digital signature
URL: <http://lists.fedoraproject.org/pipermail/users/attachments/20121117/826d2542/attachment.sig>


More information about the users mailing list