in reply to how to know the files opened by a process
Of course, if you just want access to the functionality of lsof, then you could do something like this:
#!/usr/bin/perl -w use strict; my $lsof = "/usr/sbin/lsof -u 'root'"; # Change this to suit open DATA, "$lsof|" or die "Could not open $lsof:$!\n"; while (<DATA>) { print; } close DATA;
Cheers,
Darren :)
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: how to know the files opened by a process
by swaroop (Beadle) on Dec 26, 2005 at 04:22 UTC | |
by vek (Prior) on Dec 26, 2005 at 21:21 UTC |