小编Mar*_*nco的帖子

为什么使用“|” 或“&”提供不同大小的结果文件?

这是我的解释:

  1. strings *.bin > bin.txt | sort -n bin.txt > logs1.txt

    这给了我logs1.txt,但它有 621 KB。

  2. strings *.bin > bin.txt & sort -n bin.txt > logs1.txt

    这给了我logs1.txt,但它有 0 KB。

  3. strings *.bin > bin.txt
    sort -n bin.txt > logs2.txt

    logs2.txt这些命令提供586,853 KB 大小的文件。

请注意,bin.txt大小为 586,853 KB,这意味着仅运行 3 个选项即可获得与 相同的大小bin.txt,我想知道原因。

shell pipe io-redirection background-process

2
推荐指数
1
解决办法
571
查看次数

标签 统计

background-process ×1

io-redirection ×1

pipe ×1

shell ×1