zoukankan      html  css  js  c++  java
  • 常用操作

     创建大小为1MB的文件:

      mkfile -n 1M [filename]   

      dd if=/dev/zero of=FileName2 bs=1024 count=1000

    移动文件

      mv [currentPath/filename]  [targetPath/filename]   移动currentPath下的xx到targetPath下,可用来修改名字

    copy

      cp [path/filename/*]  [targetPath/fileName] 

    zip

      zip -r [filename.zip]  [path/fileName]  {-r 子目录全部压缩,fileName.zip-压缩后的文件名,准备压缩文件的路径}

    ssh登陆

      ssh root@101.201.106.53    ssh 用户名@ip地址

    scp命令

      scp -P 22 [currentPath/fileName]  [targetPath/fileName]  -P 22 选择22端口  起始目录 目标目录

    ssh取消连接时间限制

     修改/etc/ssh/sshd_config文件,将ClientAliveInterval 0和ClientAliveCountMax 3的注释符号去掉,将ClientAliveInterval对应的0改成60,ClientAliveInterval指定了服务器端向客户端请求消息的时间间隔, 默认是0, 不发送.而ClientAliveInterval 60表示每分钟发送一次, 然后客户端响应, 这样就保持长连接了.ClientAliveCountMax, 使用默认值3即可.ClientAliveCountMax表示服务器发出请求后客户端没有响应的次数达到一定值, 就自动断开. 正常情况下, 客户端不会不响应

    然后运行:

    重启sshd服务即可!/etc/init.d/sshd restart 或者:/etc/rc.d/init.d/sshd restart

    这样立即生效

    lsusb:

      brew tap jlhonora/lsusb

      brew install lsusb

      lsusb
    mongo查看连接数
      

    netstat -antp|grep -i 27017 | awk '{print $5}'| cut -d: -f1 | sort | uniq -c | sort -n

     

     

     

    修改文件所属组

     

    chown -R nobody: dirName  

    开黑吗我亚索贼6
  • 相关阅读:
    代理
    博客园主题
    JS_1
    脚本语言
    Hadoop生态体系
    Hadoop序列化程序报错
    46. 全排列
    1038 Recover the Smallest Number (30分)
    1064 Complete Binary Search Tree (30分)
    1034 Head of a Gang (30分)
  • 原文地址:https://www.cnblogs.com/insight0912/p/7244177.html
Copyright © 2011-2022 走看看