I have a bunch of files in a directory, each with one line of text. I want to cat all of these files together (all the one liners) into a single, large file. However, when I use cat
there are too many arguments. How can I get around this?
views:
36answers:
3
+2
A:
look into xargs
find . <whatever> | xargs cat > outfile.txt
Replace the find . <whatever>
bit with your own way of getting all the files
Replace outfile.txt with your output file.
John Weldon
2010-04-30 20:10:35
+1
A:
try to use -n with xargs to reduce the number of arguments passed to cat
find .|xargs -n 100 cat >> out
oraz
2010-04-30 20:26:59