[lug] how to handle open files - upload server

Dan Ferris dan at ferrises.com
Tue Jan 13 12:11:03 MST 2004


Well, like they say, there's more than one way to do it.

The Matt wrote:
> On Tue, 2004-01-13 at 10:55, Dan Ferris wrote:
> 
>>Like this for example:
>>
>>lsof -c /ssh/ | awk '{ if ($8 ~ /\/dev/) { print $8 }}'
>>
>>Shows all files opened by any program named ssh in the dev directory.
> 
> 
> OK, I'm not lsof guru, but why doesn't:
> 
> lsof -c /ssh/ -a +D /dev
> 
> show the same output as above?  The first command shows /dev/pts/? files
> as well as /dev/null.  The second which should search through /dev,
> doesn't.
> 
> Help?
> 
> 
> 
> ------------------------------------------------------------------------
> 
> _______________________________________________
> Web Page:  http://lug.boulder.co.us
> Mailing List: http://lists.lug.boulder.co.us/mailman/listinfo/lug
> Join us on IRC: lug.boulder.co.us port=6667 channel=#colug



More information about the LUG mailing list