  | |  | lsof vs fuser | lsof vs fuser 2004-11-24 - By Ed Wilts
Back I 've heard from admins of other Unixes that lsof has considerably more
overhead than fuser to simply see if a file is open. I 've currently got
a bunch of code that does stuff like this (so if $t is open in Perl):
if (system( "/usr/sbin/lsof -Fn -- $SourceDir/* 2 >/dev/null | grep -q \ "n$t\ " ")) {
Hey, this is old code so be kind...
So, is fuser on RHEL more efficient than lsof for doing the same thing?
If so, what 's the equivalent for the command above? Is there an even
better way from within Perl to do this?
Thanks,
.../Ed
--
Ed Wilts, RHCE
Mounds View, MN, USA
mailto:ewilts@(protected)
Member #1, Red Hat Community Ambassador Program
--
Taroon-list mailing list
Taroon-list@(protected)
http://www.redhat.com/mailman/listinfo/taroon-list
|
|
 |