Fstat
From FreeBSDwiki
(Difference between revisions)
Line 6: | Line 6: | ||
'''fstat /usr/local/sbin/smbd''' - only return info on processes and users locking the file '''/usr/local/sbin/smbd'''. | '''fstat /usr/local/sbin/smbd''' - only return info on processes and users locking the file '''/usr/local/sbin/smbd'''. | ||
− | see also: [[iostat]] | + | see also: [[iostat]], [[netstat]] |
[[Category:System Commands]] | [[Category:System Commands]] |
Revision as of 13:23, 15 June 2007
fstat is a command similar to the lsof command Linux users are familiar with. Simply put, it returns a list of all open files and what user context they've been opened in. Handy arguments:
fstat -f /usr/local/etc - only return locked files from the filesystem containing /usr/local/etc/ (/usr, on most systems) fstat -p qmail-send - only return files locked by the qmail-send process fstat -u jimbo - only return files locked by the user jimbo fstat /usr/local/sbin/smbd - only return info on processes and users locking the file /usr/local/sbin/smbd.