由买买提看人间百态

boards

本页内容为未名空间相应帖子的节选和存档,一周内的贴子最多显示50字,超过一周显示500字 访问原贴
Linux版 - please help: using 'cat' to merge large text files in linux
相关主题
[请教]文件输入 (转载)比较二进制文件
弱问:如何copy目录下的所有文件到另外一个目录下?怎样保证隐私?
sed 和 bash script 求助Linux GNU C, readlink问题 (转载)
How to find and delete all hard links to a file (ZZ)how to copy one file into another?
gvim diff questionhow to rename files -- waiting on line
比较两个文件,把相同的行删除html给php传文件的问题,求解!
请教:如何用sed来改变文件中的数字how to append column data to an existing file?
问个关于user/group的粗浅问题GIT 问题
相关话题的讨论汇总
话题: files话题: large话题: cat话题: merge话题: text
进入Linux版参与讨论
1 (共1页)
l********g
发帖数: 39
1
I have some large text files formated as 12 columns, but with a very large
number of rows, say one million lines. I have about 10 of this kind of files
, maybe more up to 100, which may make a total of several GBs. Thinking
about using cat to merge them.
something like this: $ cat smalljunks*.txt > newlargejunk.txt
The questions:
can the 'cat' command handle these large files? is it possible that it
truncates the files to fit to its limit (if there is any) so that the merge
is incomplete? Becau
x****s
发帖数: 921
2
when you have the time, why not try out yourself?
dd if=/dev/zero of=/mnt/file1 bs=1M count=800
N**D
发帖数: 10322
3
1 million lines is piece of cake
large file is usually in the order of TB today

large
files
merge

【在 l********g 的大作中提到】
: I have some large text files formated as 12 columns, but with a very large
: number of rows, say one million lines. I have about 10 of this kind of files
: , maybe more up to 100, which may make a total of several GBs. Thinking
: about using cat to merge them.
: something like this: $ cat smalljunks*.txt > newlargejunk.txt
: The questions:
: can the 'cat' command handle these large files? is it possible that it
: truncates the files to fit to its limit (if there is any) so that the merge
: is incomplete? Becau

b******r
发帖数: 79
4
好像记得cat 是用流的方式读文件, 读一行出一行, 这样的话应该就没有太多的内存的
问题吧。 不是很确定, 谁能clarify一下?

large
files
merge

【在 l********g 的大作中提到】
: I have some large text files formated as 12 columns, but with a very large
: number of rows, say one million lines. I have about 10 of this kind of files
: , maybe more up to 100, which may make a total of several GBs. Thinking
: about using cat to merge them.
: something like this: $ cat smalljunks*.txt > newlargejunk.txt
: The questions:
: can the 'cat' command handle these large files? is it possible that it
: truncates the files to fit to its limit (if there is any) so that the merge
: is incomplete? Becau

l********g
发帖数: 39
5
Thank you very much for helping, everyone. It seems work with large files I
have.
1 (共1页)
进入Linux版参与讨论
相关主题
GIT 问题gvim diff question
I love virtual box!比较两个文件,把相同的行删除
install matlab请教:如何用sed来改变文件中的数字
how to get rid of the column info row in mysql query?问个关于user/group的粗浅问题
[请教]文件输入 (转载)比较二进制文件
弱问:如何copy目录下的所有文件到另外一个目录下?怎样保证隐私?
sed 和 bash script 求助Linux GNU C, readlink问题 (转载)
How to find and delete all hard links to a file (ZZ)how to copy one file into another?
相关话题的讨论汇总
话题: files话题: large话题: cat话题: merge话题: text