From owner-freebsd-hackers Thu Apr 6 11:50:36 1995 Return-Path: hackers-owner Received: (from majordom@localhost) by freefall.cdrom.com (8.6.10/8.6.6) id LAA04510 for hackers-outgoing; Thu, 6 Apr 1995 11:50:36 -0700 Received: from irz301.inf.tu-dresden.de (irz301.inf.tu-dresden.de [141.76.1.11]) by freefall.cdrom.com (8.6.10/8.6.6) with SMTP id LAA04448 for ; Thu, 6 Apr 1995 11:48:32 -0700 Received: from sax.sax.de by irz301.inf.tu-dresden.de with SMTP (5.67b+/DEC-Ultrix/4.3) id AA06669; Thu, 6 Apr 1995 20:42:23 +0200 Received: by sax.sax.de (8.6.9/8.6.9-s1) with UUCP id UAA15298 for freebsd-hackers@freebsd.org; Thu, 6 Apr 1995 20:42:16 +0200 Received: (from j@localhost) by uriah.heep.sax.de (8.6.11/8.6.9) id UAA11661 for freebsd-hackers@freebsd.org; Thu, 6 Apr 1995 20:30:16 +0200 From: J Wunsch Message-Id: <199504061830.UAA11661@uriah.heep.sax.de> Subject: Re: lsof 3.25 now available for fbsd 2.0 To: freebsd-hackers@FreeBSD.org (FreeBSD hackers) Date: Thu, 6 Apr 1995 20:30:15 +0200 (MET DST) In-Reply-To: <9504061650.AA42466@teton.Mines.Colorado.EDU> from "Ade Barkah" at Apr 6, 95 10:50:10 am Reply-To: joerg_wunsch@uriah.heep.sax.de (Joerg Wunsch) X-Phone: +49-351-2012 669 X-Mailer: ELM [version 2.4 PL23] Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit Content-Length: 824 Sender: hackers-owner@FreeBSD.org Precedence: bulk As Ade Barkah wrote: > > > Does this make sense? I'm perfectly able to look at any open file > > with fstat(1). So why restrict lsof to less than fstat can do? > > Well, lsof is capable in displaying much more than fstat by default, > to the point that other user's privacy might be invaded, so I decided > to restrict the output. > > `lsof' uses the kernel name cache to get the file name associated with > an open descriptor (if any). fstat, on the other hand, limits itself > to the mountpoint of the file unless you specifically give the file > name as an argument. Accepted. This way, lsof can get more information than fstat (and possibly ``find / -inum ...''). -- cheers, J"org joerg_wunsch@uriah.heep.sax.de -- http://www.sax.de/~joerg/ Never trust an operating system you don't have sources for. ;-)