unix的cat命令后面最多能接多少个文件?

发布网友

我来回答

1个回答

热心网友

从cat的manpage描述看,cat后面并没有能cat的文件数目的*,它只会把后面跟的所有文件都按次序一个一个的读出来并显示到标准输出或者指定的定向文件。
DESCRIPTION
The cat utility reads each file in sequence and writes it on
the standard output. Thus:

example% cat file prints file on your terminal, and:
example% cat file1 file2 >file3
concatenates file1 and file2, and writes the results in
file3. If no input file is given, cat reads from the stan-
dard input file.

另,从你的命令,要合并到后面的文件的话,不是用"<",而是用">"符号。

后面跟10万个文件的话,应该是可以的。操作过程中,注意中途不要打断,并且注意内存和硬盘空间留出足够余地。

声明声明:本网页内容为用户发布,旨在传播知识,不代表本网认同其观点,若有侵权等问题请及时与本网联系,我们将在第一时间删除处理。E-MAIL:11247931@qq.com