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
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
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
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.
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.
ASKER
thanks mod
ASKER