zoukankan      html  css  js  c++  java
  • 常用Linux Tips(不定期更新)

    查看本机所有开放端口

    lsof -i -P | grep -i listen
    

    查看一段文本单词出现频率

    awk '{b[length($0)]++;total_lines++;for(i=1;i<=NF;i++){sub(/^W+|W+$/,"",$i);a[$i]++;total_words++}} END{print "Top 10 words frequency:";for(i in a)printf "%s %.2f%%(%d/%d)
    ",i,100*a[i]/total_words,a[i],total_words| "sort -nr -k2 | head -10"}' i
    

    某时间文件

    find / -type f |xargs ls -l --full-time 2>/dev/null | awk '{print$6,$9}'|grep 11-17
    

    find排除某文件夹

    -not 
    
    find / -type f -not ( -name 'mnt' ) -user cms | tee cms_file1.txt
    
    find / -ctime -20 ( -path /proc -o -path /mnt ) -prune -type f | xargs ls -la | tee findit.txt
    

    检查NAS服务器连接信息

    showmount -e xxxxxx
  • 相关阅读:
    简单状态机
    c语言状态机
    存储公司
    正确跑步
    好好做自己能做的
    I2C学习
    es6 generator函数
    es6 for of 循环
    es6 proxy代理
    es6 Symbol类型
  • 原文地址:https://www.cnblogs.com/yuris115/p/5724697.html
Copyright © 2011-2022 走看看