Link to home
Start Free TrialLog in
Avatar of Barry Cunney
Barry CunneyFlag for Ireland

asked on

Use Unix truss command to monitor all operations and activity on a file

Hi Guys,
Can someone please give me an example of how to use the truss command to monitor all operations on a particular file.

I know there is an -r switch and reference to a file descriptor - but sure if this is simply a name of a file which you have to pass in or something different


Cheers



 B Cunney

ASKER CERTIFIED SOLUTION
Avatar of chris_calabrese
chris_calabrese

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 Barry Cunney

ASKER

Cheers chris,
I thought that there might be some trick one could use to get the truss command just to trace operations on one file
Avatar of chris_calabrese
chris_calabrese

You could probably write a perl script that monitors the output of truss and figures out which lines refer to a file of a particular name...