First of all, what is a pipeline, that is, the standard output of the previous program is used as the standard input of the following program.
The
find command will print out the found files on the terminal (standard output); if ls -l operates as 在 终端等待输入, 用户输入一个文件名, 打印出文件信息. then this is what you want. But ls -l will not actually read the terminal.
xargs converts the standard output of the previous program into the command line parameters of the next program.
For example, if find / -perm +7000 returns /tmp/1.txt, then the last command in find / -perm +7000 | xargs ls -l is actually ls -l /tmp/1.txt
First of all, what is a pipeline, that is, the standard output of the previous program is used as the standard input of the following program.
Thefind command will print out the found files on the terminal (standard output); if ls -l operates as
在 终端等待输入, 用户输入一个文件名, 打印出文件信息
. then this is what you want. But ls -l will not actually read the terminal.xargs converts the standard output of the previous program into the command line parameters of the next program.
For example, if
find / -perm +7000
returns/tmp/1.txt
, then the last command infind / -perm +7000 | xargs ls -l
is actuallyls -l /tmp/1.txt