zoukankan      html  css  js  c++  java
  • linux常用命令-find

    find /shell/
    -atime #访问时间
    -mtime #文件内容最后一次被修改的时间
    -ctime #文件元数据(例如权限或所有权)最后一次改名的时间
    --------------------------单位是天
    -amin #访问时间
    -mmin #修改时间
    -cmin #变化时间
    --------------------------单位是分钟
    -type #指明文件类型(bcdpflsD)
    -perm #按照权限查找
    -user #按照属主查找
    -delete #删除找出的文件
     
    find ./ -type f -admin +7 #找出访问时间超过7分钟的文件
    find ./ -newer 1.txt #找出比1.txt修改时间更近的文件
    find ./ -type f -size +2k #找出大于2k的文件
     
    -maxdepth 2 #查找目录的最大深度
    -mindepth 2 #查找目录的最小深度
     
    -name #按名字查找
    -iname #按名字查找(忽略大小写)
    find ./ -name (-name "*.txt" -o -name "*.pdf" )
     
    -path #匹配文件路径
    find /home/ -path "*/dingkai/*"
     
    -regex #使用正则查找
    find . -regex ".*(.py|*.sh)$"
    find . -iregex ".*(.py|*.sh)$" #忽略大小写
     
    -exec #加操作命令
    find ./ -type f -name "*.txt" -exec cp {} change/ ;

  • 相关阅读:
    vmareworkstation 15 安装密钥
    Linux进入ftp界面退出方法
    linux安装mysql(5.1.73)
    安装http服务,用http搭建web网
    telnet远程连接
    yum出现问题解决方法
    samba
    nfs搭建
    解决VMwareworkstation无法在windows上运行
    2 shell编程
  • 原文地址:https://www.cnblogs.com/dingkailinux/p/8464306.html
Copyright © 2011-2022 走看看