|
|||||||
| Forums | Search Forums | Register | Forum Rules | Man Pages | Albums | FAQ | Members | Calendar | Search | Today's Posts | Mark Forums Read |
| AIX AIX is IBM's industry-leading UNIX operating system that meets the demands of applications that businesses rely upon in today's marketplace. |
|
|
|
Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
how to find which program that update a specific file
Hello
Would you tell me how to find which program that update a specific file? I am implementing migration project. My machines OS are AIX. It is because lack of documentation, some program cannot working properly on new machine. We found the root cause of this problem is that some data files are not update properly,so I want to install program on old machine to find out which program(s) would update a specific file. ps: I am just a normal user (not root) in both new and old machine. |
| Sponsored Links | ||
|
|
#2
|
|||
|
|||
|
If you need to know what program is actively using a file, try installing lsof (or get your Admins to do this).
If you want to see who modified (past tense) a file, you will need some sort of accounting or auditing enabled. This will be trickier than you think I imagine. |
| Sponsored Links | ||
|
|
#3
|
|||
|
|||
|
gts is right - auditing a system can be tricky. Still, if you have only one (or very few) file(s) to monitor you can probably set up a loop with "lsof" and a log file, which might "catch" the offending process in the act. In any way, finding out which process modified a file in the past is impossible. You can only wait for the process to modify it again and then "catch" it while it does so.
I hope this helps. bakunin |
|
#4
|
|||
|
|||
|
with audit, a sample configuration I have done a few months ago the file to audit is /db2/SID/sqllib/db2systm in this case Code:
hostname:/etc/security/audit--# cat objects
/db2/SID/sqllib/db2systm:
r = "FILE_Open"
w = "FILE_Open"
nohup /usr/sbin/auditstream | nohup auditpr -v > /fs/audit/stream.out &
audit enable
audit startthe events are logged in /fs/audit/stream.out you need to be root to update these files |
| Sponsored Links | |
|
|
#5
|
|||
|
|||
|
I found lsof command on my machine it solve my problem.
thank you very much |
| Sponsored Links | ||
|
![]() |
| Thread Tools | Search this Thread |
| Display Modes | |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| find specific file names and execute a command depending on file's name | armando110 | Shell Programming and Scripting | 3 | 02-09-2012 08:34 PM |
| find function name in a program file | Parthiban | Shell Programming and Scripting | 8 | 06-26-2010 09:25 AM |
| Update a specific line in a file while reading sequentially | bharath.gct | Shell Programming and Scripting | 6 | 05-14-2010 02:22 AM |
| find for specific content in file in the directory and list only file names | madhu_Jagarapu | AIX | 2 | 12-23-2008 01:13 AM |
| Update specific lines in a file | aukequist | Shell Programming and Scripting | 3 | 11-15-2005 12:52 PM |
|
|