zoukankan      html  css  js  c++  java
  • Linux 任务管理器(二)

    特殊文件与进程

    fuser命令

    [root@localhost home]# fuser -muv .
                         用户     进程号 权限   命令
    /home:               root     kernel mount (root)/home
                         root      14620 ..c.. (root)bash

    查找使用某个目录的所有程序

    然后如果你再umount的时候,可以杀死他,这样就不会出现  device is busy   。这个问题我以前遇到过。我记得在前面的随笔中也有体现,当时不知道该怎么办。现在知道了,只需要在当前目录下找到使用该目录的程序,然后杀死即可

    fuse命令,可以找到某个目录,文件,被哪个进程所使用,这样就不会出现该文件正在被使用的而无法操作的现象

    lsof列出被进程所开启的文档目录信息

    鸟哥,用了vsftpd来做例子,那我们也跟着来吧

    [root@localhost ~]# yum install vsftpd-3*
    已加载插件:fastestmirror, langpacks
    Loading mirror speeds from cached hostfile
     * base: mirrors.aliyun.com
     * extras: mirrors.aliyun.com
     * updates: mirrors.zju.edu.cn
    软件包 vsftpd-3.0.2-25.el7.x86_64 已安装并且是最新版本
    无须任何处理
    [root@localhost ~]# systemctl start vsftpd           启动服务
    [root@localhost ~]# systemctl enable vsftpd       开机启动
    Created symlink from /etc/systemd/system/multi-user.target.wants/vsftpd.service to /usr/lib/systemd/system/vsftpd.service.
    [root@localhost ~]# netsata -tlnp
    bash: netsata: 未找到命令...
    [root@localhost ~]# netstat -tlnp
    Active Internet connections (only servers)
    Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name    
    tcp        0      0 0.0.0.0:111             0.0.0.0:*               LISTEN      1/systemd           
    tcp        0      0 0.0.0.0:6000            0.0.0.0:*               LISTEN      8138/X              
    tcp        0      0 192.168.122.1:53        0.0.0.0:*               LISTEN      8598/dnsmasq        
    tcp        0      0 0.0.0.0:22              0.0.0.0:*               LISTEN      7675/sshd           
    tcp        0      0 127.0.0.1:631           0.0.0.0:*               LISTEN      7677/cupsd          
    tcp        0      0 127.0.0.1:25            0.0.0.0:*               LISTEN      8037/master         
    tcp6       0      0 :::111                  :::*                    LISTEN      1/systemd           
    tcp6       0      0 :::6000                 :::*                    LISTEN      8138/X              
    tcp6       0      0 :::21                   :::*                    LISTEN      25234/vsftpd            #这里显示21端口已经开启,说明服务已经启动    
    tcp6       0      0 :::22                   :::*                    LISTEN      7675/sshd           
    tcp6       0      0 ::1:631                 :::*                    LISTEN      7677/cupsd          
    tcp6       0      0 ::1:25                  :::*                    LISTEN      8037/master        
  • 相关阅读:
    【MFC】对话框自带滚动条的使用
    【MFC】MFC DLEdit 设计属于自己的编辑框_鼠标悬停
    【MFC】MoveWindow();函数使用详解
    【MFC】SetWindowPos函数使用详解
    模板 key+1
    lazyload 分页加载
    缓慢显示隐藏
    js计算日期的前几天的日期
    判断子元素(or属性)是否存在
    动态加载的数据,hover效果
  • 原文地址:https://www.cnblogs.com/Lonelychampion/p/11419760.html
Copyright © 2011-2022 走看看