这是一串unix命令:
find // name of command (in this case, "find")
arguments to 'find':
/tmp // where to look
-name core // name to look for, "core" (optional argument)
-type f // files only (not, eg, directories or files contents)
// (optional argument)
-print // output the list to standard output (STDOUT)
| // name of command (otherwise known as
// 'pipe') this is a little program that
// takes the output from a previous process
// (in this case, the output from 'find')
// and pass it to another process as input
xargs // name of command ('xargs') the program
// that will accept the output from 'print'
// as input (directed by 'pipe'). It provides
// a robust way to process indefinitely
// long lists by breaking them into smaller
// lists and passing each sublist through
// to its command argument
/bin/rm // name of command for xargs to execute
// on its input list ('rm' = remove)
-f // argument to rm, only remove files, not directories.
这就是 unix 的工作原理,它由许多具有模糊的 2 个字母名称的小型单一用途程序组成,这些程序专门用于一项任务。您将它们串在一起以完成更复杂的任务。
找出任何一个命令的作用的正确方法是使用“man”命令并将相关命令名称作为参数,例如
man find
man xargs
man rm
您将获得描述每个输入选项和输出可能性的详细信息页面。像“xargs”这样的名字也很容易用谷歌搜索,但可以理解的是“find”不是(也许试试“unix find”)。他们中的许多人都有维基百科页面......
也许您应该获得一份体面的 unix 指南...