linux command - find
2015-08-23 00:10
411 查看
findbelongs to GNU Findutils which also includes
locate,
updatedb,
xargs.
Function
Search for files in a directory hierarchy.Snopsis
[code]find [path...] [expression]
Expression
An expression is made up of options, tests and actions, all separated by operators.Numeric arguments
+nfor greater than n,
-nfor less than n,
nfor exactly n.
tests
-name,
-iname
-path,
-ipath
-regex,
-iregex
-type
d, directory
f, regular file
l, symbolic link
-sizen[ckMG]
c, byte
actions
-delete
-execcommand
;
{}represents the file matched
-execcommand
{} +
operators
Describe logical relationship between tests.-and, this is default when omitted. shortened
-a
-or, shortened
-o
-not, shortened
-!
(), note to escape with
\
Warning
wildcards and special symbols must be quoted or escapedDouble quotes do not suppress the substitution of words that begin with “$” but they do suppress the expansion of wildcard characters.
use
-print0with
xargs -0for executing commands
Notes
find -exec cmd {} + vs | xargsWhat is the difference between find . and find . -print
相关文章推荐
- Linux系统下MySQL源码安装,完整编译支持所有字符集和默认字符集
- 安装CentOS 6.7以及CentOS 7.1
- Linux下通过RPM方式卸载MySQL
- 区分linux 物理cpu,逻辑cpu,核数
- Linux命令行中创建的软连接(ln -s)的无法移动问题,以及绝对路径和相对路径的概念
- Linux简单命令学习
- Linux简单命令学习
- 新手应该掌握的Linux命令
- CentOS 7中没有ifconfig命令,而且不能发现eth0
- Linux运维职业路线(笔记)-- 马哥教育 张Sir
- linux系统时钟和硬件时钟不一致
- Linux学习之基础命令
- Centos7 修改主机名
- CentOs6.5 关闭独显
- Linux命令的返回值
- 2015-08-22 linux命令练习3
- 2015-8-22 linux命令练习2
- 初涉Linux ----------> Ubuntu15.04的安装与美化
- Linux基础知识--3.Linux目录和文件相关命令和Linux基础特性2
- Linux下交叉编译gdb和gdbserver