zoukankan      html  css  js  c++  java
  • 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

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

  • 相关阅读:
    排序算法(I)冒泡排序
    C#常用类string
    HashMap----工作原理
    Java计算字符串中字母出现的次数
    数据库优化
    线程和进程的区别(详细)
    SpringMVC工作原理
    jsp运行原理及运行过程
    一个公告
    SR
  • 原文地址:https://www.cnblogs.com/tzhyy/p/10644735.html
Copyright © 2011-2022 走看看