Why does this not work?
ls *.txt | xargs cat > all.txt
(I want to join the contents of all text files into a single 'all.txt' file.) find with -exec should also work, but I would really like to understand the xargs syntax.
Thanks
|
feedback
|
|
might work a bit better, since it would append to all.txt instead of creating it again after each file. By the way, | |||||||||||||
feedback
|
|
If some of your file names contain ', " or space In general never run Consider using GNU Parallel instead:
or if you prefer:
Learn more about GNU Parallel http://www.youtube.com/watch?v=OpaiGYxkSuQ | |||
|
feedback
|
|
On the other hand:
This will read from textfiles in your current directory into the all.txt in a subdirectory (not included with | |||||
feedback
|