zoukankan      html  css  js  c++  java
  • day14 find

    find命令查找信息补充
    查看找文件数据信息:
    精确查找:
    find 路径信息 -type 文件类型 -name "文件名"
    模糊查找:
    find 路径信息 -type 文件类型 -name "文件名*"
    find 路径信息 -type 文件类型 -name "*文件名"
    find 路径信息 -type 文件类型 -name "文*件名"
    忽略大小写查找:
    find 路径信息 -type 文件类型 -iname "文件名*"
    根据数据大小查找数据:
    find /oldboy -type f -size +100 --- 找出大于100K的文件
    find /oldboy -type f -size -100
    find /oldboy -type f -size +1M --- 找出大于1M的文件
    `b' for 512-byte blocks (this is the default if no suffix is used)
    `c' for bytes (推荐)
    `w' for two-byte words
    `k' for Kilobytes (units of 1024 bytes) (推荐)
    `M' for Megabytes (units of 1048576 bytes) (推荐)
    `G' for Gigabytes (units of 1073741824 bytes)
    根据目录指定层级进行查找数据(进行递归查找)
    [root@oldboyedu oldboy01]# find /oldboy -type f -name "Oldboy*"
    /oldboy/oldboy01/Oldboy.txt
    /oldboy/Oldboy.txt
    [root@oldboyedu oldboy01]# find /oldboy -maxdepth 1 -type f -name "Oldboy*"
    /oldboy/Oldboy.txt
    [root@oldboyedu oldboy01]# find /oldboy -maxdepth 2 -type f -name "Oldboy*"
    /oldboy/oldboy01/Oldboy.txt
    /oldboy/Oldboy.txt
    [root@oldboyedu oldboy01]# find /oldboy -type f -name "Oldboy*" -maxdepth 1
    find: warning: you have specified the -maxdepth option after a non-option argument -type, but options are not positional (-maxdepth affects tests specified before it as well as those specified after it). Please specify options before other arguments.

    /oldboy/Oldboy.txt
    根据数据的权限进行查找数据???
    根据数据的时间信息查找??? 将30天以前的所有数据进行删除?

  • 相关阅读:
    ifconfig详解
    ln命令总结
    2008年国外最佳Web设计/开发技巧、脚本及资源总结
    金刚经全译文
    Ifconfig网络配置工具详解
    High Availability PostgreSQL HOWTO
    女人新标准
    JFreeChart API文档
    云计算火热背后:标准及安全成首要问题 狼人:
    Adobe Reader 9.3.2发布 修补15个安全漏洞 狼人:
  • 原文地址:https://www.cnblogs.com/huangfeng666/p/12102333.html
Copyright © 2011-2022 走看看