- 论坛徽章:
- 1
|
under /proc/pid$$$/fd you can see the real files that have been opened by the process.
Use procfiles pid$$$,part of the output will like "dev:10,5",then you can use command ls -l /dev/ | grep "10, *5",
# ls -l | grep "10, *5"
brw-rw---- 1 root system 10, 5 Oct 10 2005 hd2
crw-rw---- 1 root system 10, 5 Oct 10 2005 rhd2
So the device or logical volume that contains the file system in this example is /dev/hd2.
# lsfs | grep hd2
/dev/hd2 -- /usr jfs2 3801088 --
yes no
This filesystem is mounted at /usr.
We can use the following command to obtain information about the file with file descriptor 4 and inode 13407.
# istat 13407 /usr
Inode 13407 on device 10/5 File
Protection: rw-r--r--
Owner: 2(bin) Group: 2(bin)
Link count: 1 Length 4811 bytes
Last updated: Tue Aug 24 16:14:48 CDT 2004
Last modified: Mon Jul 12 11:33:31 CDT 2004
Last accessed: Wed Aug 9 09:16:28 CDT 2006
Block pointers (hexadecimal):
1892c
We can use this find command to find all file names in the filesystem /usr with an inode of 13407.
# cd /usr
# find . -inum 13407 -exec ls -l {} \;
-rw-r--r-- 1 bin bin 4811 Jul 12 2004
./lib/nls/msg/en_US/hostmibd.cat |
评分
-
查看全部评分
|