zoukankan      html  css  js  c++  java
  • 查看文件所打开的文件句柄

    [root@web02 ~]# tail anaconda-ks.cfg -f
    
    %addon com_redhat_kdump --enable --reserve-mb='auto'
    
    %end
    
    %anaconda
    pwpolicy root --minlen=6 --minquality=1 --notstrict --nochanges --notempty
    pwpolicy user --minlen=6 --minquality=1 --notstrict --nochanges --emptyok
    pwpolicy luks --minlen=6 --minquality=1 --notstrict --nochanges --notempty
    %end
    ^Z
    [1]+  Stopped                 tail anaconda-ks.cfg -f
    [root@web02 ~]# ps aux |grep tail
    root      83053  0.0  0.0 107992   620 pts/0    T    12:41   0:00 tail anaconda-ks.cfg -f
    root      83061  0.0  0.0 112708   976 pts/0    R+   12:41   0:00 grep --color=auto tail
    [root@web02 ~]# ll /proc/83053/fd/
    total 0
    lrwx------ 1 root root 64 Jan  2 12:42 0 -> /dev/pts/0
    lrwx------ 1 root root 64 Jan  2 12:42 1 -> /dev/pts/0
    lrwx------ 1 root root 64 Jan  2 12:41 2 -> /dev/pts/0
    lr-x------ 1 root root 64 Jan  2 12:42 3 -> /root/anaconda-ks.cfg
    lr-x------ 1 root root 64 Jan  2 12:42 4 -> anon_inode:inotify
    

    0代表标准错误输入
    1代表标准输出
    2代表错误输出
    3代表文件
    4代表anon_inodefs 是为了公共需求抽离出来的一个内核文件系统,只有一个 inode ,为了节省内存,抽象重复代码之用
    
  • 相关阅读:
    linux scull 函数open 方法
    linux scull 中的设备注册
    linux 字符设备注册
    linux inode 结构
    linux设备驱动文件结构
    linux一些重要数据结构
    Python3.2官方文档翻译--输出格式化
    1021. Deepest Root (25)
    hdu 4779 Tower Defense (思维+组合数学)
    cookie是什么? -- web
  • 原文地址:https://www.cnblogs.com/jeffcsr/p/15757335.html
Copyright © 2011-2022 走看看