shell命令-find常用命令
来源:互联网 发布:linux top命令详解 编辑:程序博客网 时间:2024/06/07 03:21
find常用命令
find命令
find - 递归地在层次目录中处理文件,可以简单理解为在指定目录下查找文件
常用命令
根据文件名查找 -name
完全匹配
find ./ -name test
查找名字为test的文件或者目录,其中./为当前目录
模糊匹配:?
find ./ -name “test??”
查找名字以test开头,之后有两个任意字符的文件或者目录,其中./为当前目录
模糊匹配:*
find ./ -name “test*”
查找名字以test开头,之后有零个或者任意字符的文件或者目录,其中./为当前目录
其他一些命令参考
-type c
文件是 c 类型的。类型可取值如下:b 特殊块文件(缓冲的)
c 特殊字符文件(不缓冲)
d 目录
p 命名管道 (FIFO)
f 普通文件-mount, -xdev : 只检查和指定目录在同一个文件系统下的文件,避免列出其它文件系统中的文件
-amin n : 在过去 n 分钟内被读取过
-anewer file : 比文件 file 更晚被读取过的文件
-atime n : 在过去 n 天过读取过的文件
-cmin n : 在过去 n 分钟内被修改过
-cnewer file :比文件 file 更新的文件
-ctime n : 在过去 n 天过修改过的文件
-empty : 空的文件-gid n or -group name : gid 是 n 或是 group 名称是 name
-ipath p, -path p : 路径名称符合 p 的文件,ipath 会忽略大小写
-name name, -iname name : 文件名称符合 name 的文件。iname 会忽略大小写
-size n : 文件大小 是 n 单位,b 代表 512 位元组的区块,c 表示字元数,k 表示 kilo bytes,w 是二个位元组
其他可以参考
man find
- shell命令-find常用命令
- 【Linux常用命令】find命令
- shell 常用命令之二 find
- linux shell之find常用命令
- shell脚本 find命令
- shell笔记--find命令
- shell 命令 笔记--find
- shell之find命令
- shell的find命令
- Linux shell命令---------find
- shell之find命令
- Shell命令 find
- shell命令 - find
- shell find查找命令
- shell find命令用法
- shell命令之find
- Hadoop 常用命令--------shell命令
- shell命令-grep常用命令
- maximal-rectangle
- 七、Spring Cloud系列:让Logback日志中显示主机名与IP地址
- TpsFs文件系统概述(一)
- [SCOI2005]栅栏 二分+dfs
- [模板] 最小费用最大流
- shell命令-find常用命令
- 题目40-公约数和公倍数
- 人数统计 树状数组+离散化
- 56. Merge Intervals
- BZOJ 2431 [HAOI2009]逆序对数列 动态规划
- 组合数——扑克牌
- zabbix 安装及部署
- 数据库连接池
- innerHTML与createTexNode的区别