linux - Find out when file was added to system or placed in directory -


on ubuntu: want able determine when file added system or in other words when placed/copied directory. time stamp 'last modified' when 1 installs apt timestamp not same when placed on system. thanks

you can use inotify.

from manpage: "the inotify api provides mechanism monitoring filesystem events. inotify can used monitor individual files, or monitor directories."

watching file or directory change can done

int inotify_add_watch(int fd, const char *pathname, uint32_t mask);

where mask can in_modify see modifications on file/directory.


Comments

Popular posts from this blog

angularjs - ADAL JS Angular- WebAPI add a new role claim to the token -

php - CakePHP HttpSockets send array of paramms -

node.js - Using Node without global install -