#-exec command {} \; —–将查到的文件执行command操作,{} 和 \;之间有空格 #-ok 和-exec相同,只不过在操作前要询用户 例:find . -name .svn | xargs rm -rf =====================find参数说明===================== -name filename #查找名为filename的文
find $HOME -mtime 0 Search for files in your home directory which have been modified in the last twenty-four hours. This command works this way because the time since each file was last modified is divided by 24 hours and any remainder is discarded. That means that to match -mtime 0, ...
-exec command {}\; : 根据 find 命令的结果执行命令 -ok command : 它将运行与 -exec 相同的命...
/etc/pam.d/passwd root@localhost ~# find /etc/ -mindepth 1 -name passwd /etc/passwd /etc/pam.d/passwd ##查找/etc目录下最少层次为1最多层次为2的以.conf结尾的文件 root@localhost ~# find /etc/ -mindepth 1 -maxdepth 2 -name *.conf Understanding Depth In Linux Find Command @4参数含...
The find command is one of the most useful Linux commands, especially when you're faced with the hundreds and thousands of files and folders on a modern computer. As its name implies, find helps you find things, and not just by filename....
find — Linux manual page find - 在目录层次结构中搜索文件 find 路径 -命令参数 [输出形式] 参数说明:路径:告诉find在哪儿去找你要的东西,命令参数:参数很多下面会说到输出形式:输出形式很多,-print,-printf,-print0,-exec,-ok,-ls反正很多自己看手册吧。 说一下exec,-exec find命令对匹配的文件执行该...
The Linux Find command can filter objects recursively using a simple conditional mechanism, and if you use the -exec flag, you’ll also be able to find a file in Linux straightaway and process it without needing to use another command.
Linux find 命令用来在指定目录下查找文件。 任何位于参数之前的字符串都将被视为欲查找的目录名。 如果使用该命令时,不设置任何参数,则 find 命令将在当前目录下查找子目录与文件。并且将查找到的子目录和文件全部进行显示。 语法 find path -option [ -print ] [ -exec -ok command ] {} \; 参数说明 :...
Reviewed by: Eric Martin Files Search find reference 1. Introduction The Linux find command can be used to find files and directories on a disk. It provides several command-line options that make it a powerful tool. In this tutorial, we’ll look at how to use the find command. 2. ...
-exec,find命令对匹配的文件执行该参数所给出的shell命令。相应命令的形式为'command' { } \;,注意{ }和\;之间的空格 find ./ -size 0 -exec rm {} \; 删除文件大小为零的文件 (还可以以这样做:rm -i `find ./ -size 0` 或 find ./ -size 0 | xargs rm -f &) ...