• linux find命令学习


    做个笔记,没事看一看记一记,看看还记得不

    # find . -name tecmint.txt

    ./tecmint.txt
    # find /home -name tecmint.txt
    /home/tecmint.txt
    # find /home -iname tecmint.txt
    ./tecmint.txt
    ./Tecmint.txt
    # find / -type d -name Tecmint
    /Tecmint
    # find . -type f -name tecmint.php
    ./tecmint.php
    # find . -type f -name "*.php"
    ./tecmint.php
    ./login.php
    ./index.php
    # find . -type f -perm 0777 -print
    # find / -type f ! -perm 777
    # find / -perm 2644
    # find / -perm 1551
    # find / -perm /u=s
    # find / -perm /g=s
    # find / -perm /u=r
    # find / -perm /a=x
    # find / -type f -perm 0777 -print -exec chmod 644 {} ;
    # find / -type d -perm 777 -print -exec chmod 755 {} ;
    # find . -type f -name "tecmint.txt" -exec rm -f {} ;
    # find . -type f -name "*.txt" -exec rm -f {} ;
    OR
    # find . -type f -name "*.mp3" -exec rm -f {} ;
    # find /tmp -type f -empty
    # find /tmp -type d -empty
    # find /tmp -type f -name ".*"
    # find / -user root -name tecmint.txt
    # find /home -user tecmint
    # find /home -group developer
    # find /home -user tecmint -iname "*.txt"
    # find / -mtime 50
    # find / -atime 50
    # find / -mtime +50 –mtime -100
    # find / -cmin -60(Changed) 
    # find / -mmin -60(Modified) 
    # find / -amin -60(Accessed)
    # find / -size 50M
    # find / -size +50M -size -100M
    # find / -size +100M -exec rm -rf {} ;
    # find / -type f -name *.mp3 -size +10M -exec rm {} ;
  • 相关阅读:
    spring mvc 源码简要分析
    tomcat 开启远程debug
    jdk1.5-jdk1.9的主要区别
    关于elasticsearch 6.x及其插件head安装(单机与集群)5分钟解决
    mysql主从配置(5分钟解决问题)
    内部类总结
    Colored Sticks
    vim 将tab转为空格
    shell编程
    vim -- 查找和替换
  • 原文地址:https://www.cnblogs.com/chriszsy/p/13216100.html
Copyright © 2020-2023  润新知