need help - processes and directories
ken at flyingtoasters.net
ken at flyingtoasters.net
Tue Aug 12 17:47:14 EDT 2003
But lsof -does- do it. For example:
greenroom:/home/ken/Maildir/cur# pwd
/home/ken/Maildir/cur
greenroom:/home/ken/Maildir/cur# lsof | grep "/home/ken/Maildir/cur"
lsof 12775 root [...] /home/ken/Maildir/cur
grep 12776 root [...] /home/ken/Maildir/cur
lsof 12777 root [...] /home/ken/Maildir/cur
Assuming you have permissions to see the files (try it as root to be
sure), lsof should show you most everything. lsof -can- sometimes not
work properly with, say, stale NFS handles, but that's when things start
getting weird. If you're just looking for where something resides, use
lsof.
$.02,
-Ken
> Jeff,
>
>> Is there a way I can find out what processes are 'sitting' in a
>> directory? For example a program that has used chdir to get to a
>> particular directory?
>
> I'm not at a Linux system right now, but fuser on Solaris will append the
> letter 'c' after a process ID if it is using the specified directory.
>
> Larry
>
> _______________________________________________
> gnhlug-discuss mailing list
> gnhlug-discuss at mail.gnhlug.org
> http://mail.gnhlug.org/mailman/listinfo/gnhlug-discuss
>
More information about the gnhlug-discuss
mailing list