• AIX 下的 find 命令使用


     

    平常我们使用 find , -size +100M/K/G ,就可以找到相应大小的文件了。

    可是 AIX 平台下,却好像不能使用,虽然执行起来不报错,但是查找出来的文件却并不是我们想要的。所以 man 了下手册

    找出n 个字节大小的文件

    bc 1024*1024 1048576=1Mb

    find . -size +1000000c 

    find . -size +1048576c

    find . -size 10485760c

    例如: 查找一个 800M 的大文件

    find ./batch/spool -size +838860800c             --800*10485760=838860800  在/batch/spool 下

    注意: 一定要看清不是文件夹,只是文件

    查询所有的普通文件,并搜索"device"这个词:

    find / -type f -print | xargs grep "device"

    查找当前目录下所有的普通文件,并搜索DBO这个词:

    find . -name *-type f -print | xargs grep "DBO"

    注意表示转义

    查询/apps/audit目录下,所有用户具有读写和执行权限的文件,并回收其他用户组的写权限:

    find /apps/audit -perm -7 -print | xargs chmod o-w

    ./myfile: commands text

    ./first2: commands text

    ./test.sql: commands text

    -----------------------------------------------------------------------------------------------------------------------------------------------------------------------

  • 相关阅读:
    解决div嵌套时IE8和FF无法自适应高度
    64位windows系统安装javaee6.0不成功解决方案
    awk 处理
    mysql 事务控制
    mysql 事务控制
    mysql 保留的关键字
    mysql 保留的关键字
    expect set timeout -1 永不超时
    expect set timeout -1 永不超时
    aliyun 安装图形
  • 原文地址:https://www.cnblogs.com/tzhyy/p/10644735.html
Copyright © 2020-2023  润新知