[PLUG] Open files

Michael Montagne michael at themontagnes.com
Wed Nov 10 18:09:38 UTC 2004


All great suggestions.  Thank you.

>On 11/10/04, Paul Heinlein busted out the keyboard and typed:

> On Wed, 10 Nov 2004, Michael Montagne wrote:
> 
> > So, I'm switching my main office file server to Linux/Samba.  One of 
> > the features I need is the one that list which users have which 
> > files open.  the lsof command gives too much info and doesn't seem 
> > to list this sort of info anyway (I think).  Any suggestions?
> 
> The +D option in lsof will limit your search to a specific directory 
> or set of directories:
> 
>    lsof +D /home
> 
> In a pipeline, it's fairly easy to get a list of user names and open 
> files:
> 
>    lsof +D /home | grep -w REG | awk '{print $3" "$9}'
> 
> -- Paul Heinlein <heinlein at madboa.com>
> _______________________________________________
> PLUG mailing list
> PLUG at lists.pdxlinux.org
> http://lists.pdxlinux.org/mailman/listinfo/plug
> 

-- 
Michael Montagne
michael at themontagnes.com
http://www.themontagnes.com



More information about the PLUG mailing list