Link to home
Start Free TrialLog in
Avatar of janjerell
janjerell

asked on

Monitor files in a specific directory in C Programming Language in UNIX

Hi,

Is there a way we can monitor files in a specific directory in UNIX using C Programming Language?

What I want is, when a file (file1.txt) in a directory (example A directory) is moved to different directory (B directory) my C program will log it in a file. The program will add a line on a log file like:
"file1.txt is moved to B directory" ...

Is this possible in C? How? Or do you have any other recommendations?

Thanks a lot.

-jan
ASKER CERTIFIED SOLUTION
Avatar of evilrix
evilrix
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of janjerell
janjerell

ASKER

Thanks so much evilrix... I'll get back to you soon as I figured this out...
Thanks evilrix.. I have it working right now... SOrry for the Grade.. It should be A.. I don't know how to change.. anyway, thanks again...
>> Thanks evilrix..
Most welcome.

>> SOrry for the Grade.. It should be A.
If you'd like to change the grade you can "Request Attention" by clicking the link at the top right of the page and posting a request in Community Support.
Many thanks indeed.
thanks mod