-exec command {}\; : 根据 find 命令的结果执行命令 -ok command : 它将运行与 -exec 相同的命...
Traverse the filesystem just once, listing setuid files and directories into /root/suid.txt and large files into /root/big.txt. 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...
Find all files and directories related to a particular name: locate [name] List names that begin with a specified character [a] in a specified location [/folder/location] by using the ref="phoenixnap.com/kb/guide">find command: find [/folder/location] -name [a] See files larger than a...
Traverse the filesystem just once, listing setuid files and directories into/root/suid.txt and large files into /root/big.txt.find$HOME -mtime0Searchforfilesinyour home directorywhichhave been modifiedinthelasttwenty-four hours. This command works this way because thetimesince eachfilewaslastmodi...
bin/包含用户二进制文件、可执行文件。 /sbin包含用户二进制文件、可执行文件。 /etc包含本地系统和应用程序的配置文件。 例如,你将在/etc/system目录中创建一些配置文件,使 ASP.NET Core 应用程序可由系统自动启动。 /home包含每个用户的主目录。 例如 ,/home/<userna...
find / -name "CON.FILE" -depth –print 它将首先匹配所有的文件然后再进入子目录中查找 -mount:在查找文件时不跨越文件系统mount点。 find . -name "*.XC" -mount –print 从当前目录开始查找位于本文件系统中文件名以XC结尾的文件(不进入其他文件系统) ...
The mkdir command is used to create a new directory. For example, “mkdir newdir” would create a new directory named “newdir” in the current directory. 4. rm (Remove): The rm command is used to remove files and directories. For example, “rm file.txt” would delete the file named...
$ find . -size +100M -delete 4.-exec将查找到的文件传递给 command 命令。下边例子是将查找到的文件传递给了 ls 命令,同理我们可以传递给任何一个 Linux 命令,功能十分强大,也很灵活。 $ find . -name"*.txt"-execls-lh {} \; -rw-r--r-- 1 root root 16 Jan 24 23:20 ./a.txt ...
NOTE If you have any questions about the commands described in the previous sections, you may be able to find the answers by using the man command. 注意 如果您对前面章节中描述的命令有任何疑问,可以使用 man 命令找到答案。 Manual pages are referenced by numbered sections. When someone refers to...
| command <> file1_in.txt_or_file1_out.txt general syntax for text manipulation using PIPE, STDIN and STDOUT cat file1 | command( sed, grep, awk, grep, etc...) > result.txt 合并一个文件的详细说明文本,并将简介写入一个新文件中 cat file1 | command( sed, grep, awk, grep, etc.....