- 论坛徽章:
- 1
|
执行命令:
- watch "{ ls -l /dev/fd/; lsof -d 1,3; }"
复制代码
会看得更清楚些:
- Every 2s: { ls -l /dev/fd/; lsof -d 1,3; } Tue Jun 6 10:53:43 2006
- total 0
- lrwx------ 1 user user 64 2006-06-06 10:53 0 -> /dev/pts/0
- l-wx------ 1 user user 64 2006-06-06 10:53 1 -> pipe:[7779083]
- lrwx------ 1 user user 64 2006-06-06 10:53 2 -> /dev/pts/0
- lr-x------ 1 user user 64 2006-06-06 10:53 3 -> /proc/18299/fd
- COMMAND PID USER FD TYPE DEVICE SIZE NODE NAME
- bash 17936 user 1u CHR 136,0 2 /dev/pts/0
- watch 18261 user 1u CHR 136,0 2 /dev/pts/0
- watch 18261 user 3r FIFO 0,5 7779083 pipe
- sh 18298 user 1w FIFO 0,5 7779083 pipe
- lsof 18300 user 1w FIFO 0,5 7779083 pipe
- lsof 18300 user 3r DIR 0,2 0 1 /proc
复制代码
我的环境是debian sarge,kernel 2.4.27。cygnus兄的环境也许不同。^_^ |
|