gpt4 book ai didi

linux - grep : Memory Exhausted on comparing two files to find the delta

转载 作者:塔克拉玛干 更新时间:2023-11-03 01:18:11 31 4
gpt4 key购买 nike

在我的项目中,我将 file1 与 file2 进行比较,差异将在 output_file 中创建(两个文件之间的增量)。我正在使用以下命令来查找差异:

grep -v -F -f <file1> <file2> > <output_file>

当我比较大小为 22MB 左右的文件时,出现以下错误:

grep: memory exhausted

当我比较较小的文件时,它工作正常。如果需要任何调整,请告诉我。

最佳答案

你可以在这台机器上添加交换分区,这样如果内存用完了,机器可以从交换分区中占用空间。这是添加交换分区的链接 http://www.thegeekstuff.com/2010/08/how-to-add-swap-space/?utm_source=feedburner

关于linux - grep : Memory Exhausted on comparing two files to find the delta,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/47882158/

31 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com