单词 | Xargs | ||||||||||||
释义 | Xargs
更多释义 收起释义 例句释义: 命令详解,参数代换,可在管道中使用 1. By default, xargs delimits input with a space (or newline) to produce a list of files to operate on. 在缺省情况下,xargs将使用空格(或者换行符)对输入字符串进行划分,以便产生可以进行操作的一个文件列表。 www.ibm.com 2. Wherever the replacement string occurs in the command you ask xargs to execute, it will be replaced by an argument. 如果xargs将要执行的命令包含有替换字符串,那么将使用参数替换它。 www.ibm.com 3. Although our examples have used simple text files for illustration, you will seldom want to use xargs with input like this. 尽管我们的例子为了便于演示使用了简单的文本文件,您很少看到包含这样的输入的xargs。 www.ibm.com 4. However, when xargs builds the command, it will pass as many parameters at once as it possibly can. 不过,当xargs构建命令时,它将一次传递尽可能多的参数。 www.ibm.com 5. You can also use the -L option of xargs to have it treat lines as arguments rather than the default of individual blank-delimited tokens. 您还可以使用xargs的-L选项让命令将行当作参数看待,而不是默认的以单个空格分隔的标记。 www.ibm.com 6. The xargs command will not build arbitrarily long commands. xargs命令不会构建任意长度的命令。 www.ibm.com 7. By default, xargs breaks the input at blanks, and each resulting token becomes a parameter. 默认情况下,xargs在空格处中断输出,并且每个生成的标记都成为一个参数。 www.ibm.com 8. By the way, if you want to preview the commands that xargs produces, add the option -p or -t. 另外,如果您希望预览xargs产生的命令,可以添加选项-p或者-t。 www.ibm.com 9. If such an error occurs, use a pipe and the xargs utility. 如果出现此类错误,可使用管道xargs实用工具。 www.ibm.com 10. We could use xargs instead, but we already saw problems with blanks in file names. 我们也可以改为使用xargs,但我们已经看到了文件名中包含空格时出现的问题。 www.ibm.com 1. Use the xargs tool as a filter for making good use of output culled from the find command. 使用xargs工具作为筛选器,以充分利用从find命令挑选的输出。 www.ibm.com 2. Next, awk reduces the output to the process ID, which you feed into xargs. 接下来,awk只显示输出结果中的进程ID,并将它传递给xargs。 www.ibm.com 3. In Listing 19 we try using find with -exec rather than ls with xargs. 在清单19中我们尝试使用带有-exec的find,而不是带有xargs的ls。 www.ibm.com 4. In Listing 17 we first copy text1 to "text 1" and then show some ways of using a list of file names containing blanks with xargs. 在清单17中,我们首先将text1复制到“text1”,然后显示一些在xargs命令中使用包含空格的文件名列表的方法。 www.ibm.com 5. In Listing 13 we illustrate the use of both forms and add an explicit invocation of echo to our use of xargs. 在清单13中,我们使用了这两种方法,并为使用xargs添加一个显式的echo调用。 www.ibm.com 6. Listing 16 shows one way you might pass a directory listing through xargs to a command such as grep. 清单16显示了一种通过xargs将目录清单传递到命令(比如grep)的方法。 www.ibm.com 7. Use xargs outside of find . 在find之外使用xargs。 www.ibm.com 8. On the other hand, xargs is rarely used except with other utilities, most often find. 另一方面,xargs除了与其他实用程序(最常见的是find)配合使用外,很少单独使用。 www.ibm.com 9. If you run find on such a batch of files and pass the list of results to xargs, the spaces in the file names cause errors 如果您对大量的文件运行find命令,并且将结果列表传递给xargs,那么文件名中的空格将会导致错误 www.ibm.com 10. Using the find command with the -exec option or with xargs 使用带有-exec选项或xargs的find命令 www.ibm.com 1. Listing 15. Example of using of the xargs tool 清单15.xargs工具的使用示例 www.ibm.com 2. Listing 14. Example of output from the xargs tool 清单14.xargs工具产生的输出示例 www.ibm.com 3. Listing 13. Example of the classic use of the xargs tool 清单13.xargs工具的经典用法示例 www.ibm.com |
||||||||||||
随便看 |
|
英汉双解词典包含2704715条英汉词条,基本涵盖了全部常用单词的翻译及用法,是英语学习的有利工具。