-exec command {}\; : 根据 find 命令的结果执行命令 -ok command : 它将运行与 -exec 相同的命...
In Linux, the “find” command is a powerful tool used to search for files and directories in a directory hierarchy. It offers a wide range of options to help you customize the search criteria and perform various actions on the found files. To use the “find” command, you need to open...
13. find (Find): The find command is used to search for files or directories. For example, “find /home -name “*.txt”” would search for all the files ending with “.txt” in the “/home” directory. 14. tar (Tape Archive): The tar command is used for creating, viewing, and ...
pathname: find 命令所查找的目录路径。例如用。来表示当前目录,用/来表示系统根目录。 -print:find 命令将匹配的文件输出到标准输出。 -exec:find 命令对匹配的文件执行该参数所给出的 shell 命令。相应命令的形式为'command' { } \;,注意{ }和、;之间的空格。 -ok: 和 -exec 的作用相同,只不过以一种更...
Linux 上的find命令是findutil软件包的一部分,一般已经默认集成在了几乎所有的发行版中。 find 命令有非常大的灵活性,可以向其指定丰富的搜索条件(如文件权限、属主、属组、文件类型、日期和大小等)来定位系统中的文件和目录。 此外,find 还支持对搜索到的结果进行多种类型的命令操作。
COMMAND:进程的名称 PID:进程标识符 USER:进程所有者 FD:文件描述符,应用程序通过文件描述符识别该文件。如cwd、txt等 TYPE:文件类型,如DIR、REG等 DEVICE:指定磁盘的名称 SIZE:文件的大小 NODE:索引节点(文件在磁盘上的标识) NAME:打开文件的确切名称
[root@zorrozou-pc0 zorro]# find /etc/ -perm 644 -ls 这个写法跟: [root@zorrozou-pc0 zorro]# find /etc/ -perm u=rw,g=r,o=r -ls 是等效的。 另外要注意,mode指定的是完全符合这个权限的文件,如: [root@zorrozou-pc0 zorro]# find /etc/ -perm u=rw,g=r -ls ...
find / -xdev -name "*.cpp":仅在当前文件系统中查找.cpp文件。 locate "*.sh":查找扩展名为.sh的文件(需先运行 updatedb 命令)。 whereis zsh:显示zsh命令的二进制文件、源代码和手册页位置。 which zsh:显示zsh命令的完整路径。 文本处理 cat file* | command > result.txt:合并多个文件并通过命令(如...
find pathname -options [-print -exec -ok ...] 2、find命令的参数; pathname: find命令所查找的目录路径。例如用.来表示当前目录,用/来表示系统根目录。 -print: find命令将匹配的文件输出到标准输出。 -exec: find命令对匹配的文件执行该参数所给出的shell命令。相应命令的形式为'command' { } \;,注意...
Linux 记录得很好。 几乎每个命令都有一个有用的帮助页面可用。使用人与信息命令在 Linux 中显示帮助页。 例如,若要自行了解有关命令的详细信息find,请运行man find或info find。 根据“帮助”页,whereis定义如下所示: whereis找到指定命令名称的二进制文件、源文件和手...