• centos6下无法使用lsof命令"-bash: lsof: command not found"


    1. 问题描述
    在centos下, 无法使用命令lsof, 出现以下信息:
    # lsof -i:3690
    -bash: lsof: command not found
    2. 解决方法
    我们可以通过yum来安装:
    # yum install lsof
    本人操作如下:
    # yum install lsof
    Loaded plugins: fastestmirror
    Setting up Install Process
    Loading mirror speeds from cached hostfile
    * base: mirrors.163.com
    * epel: ftp.cuhk.edu.hk
    * extras: mirrors.aliyun.com
    * updates: mirrors.163.com
    Resolving Dependencies
    --> Running transaction check
    ---> Package lsof.x86_64 0:4.82-4.el6 will be installed
    --> Finished Dependency Resolution

    Dependencies Resolved

    ================================================================================
    Package Arch Version Repository Size
    ================================================================================
    Installing:
    lsof x86_64 4.82-4.el6 base 319 k

    Transaction Summary
    ================================================================================
    Install 1 Package(s)

    Total download size: 319 k
    Installed size: 890 k
    Is this ok [y/N]: y
    Downloading Packages:
    lsof-4.82-4.el6.x86_64.rpm | 319 kB 00:00
    Running rpm_check_debug
    Running Transaction Test
    Transaction Test Succeeded
    Running Transaction
    Installing : lsof-4.82-4.el6.x86_64 1/1
    Verifying : lsof-4.82-4.el6.x86_64 1/1

    Installed:
    lsof.x86_64 0:4.82-4.el6

    Complete!
    3. lsof 的常用几个命令
    lsof -i:(端口号)
    如,
    lsof -i:3306 (3306默认是mysql服务端的端口)
    lsof -i:3690 (3690默认是svn服务端的端口)



    OK, Enjoy it!!!

  • 相关阅读:
    抽象工厂学习笔记
    SQL Transcation的一些总结
    享元模式(Flyweight)
    编程语言简史
    代理模式(Proxy)
    打造属于你的提供者(Provider = Strategy + Factory Method)
    打造属于你的加密Helper类
    单例模式(Singleton)的6种实现
    在C#中应用哈希表(Hashtable)
    InstallShield脚本语言的编写
  • 原文地址:https://www.cnblogs.com/insane-Mr-Li/p/10723268.html
Copyright © 2020-2023  润新知