Copy contents of a file

I am trying to copy a whole bunch different files' contents into one big file. Is there a way to do this without having to open up each individual file and copying and pasting the contents? Is there a quick way to just right click a file and copy the contents directly? Thanks in advance!


You can run the shell command /usr/bin/textutil in the Terminal.app found in /Applications/Utilities/

textutils Can be used to convert the text from one format to another.

But it also can "Read the specified files, concatenate them, and write the result out as a single file in the indicated format."

/usr/bin/textutil file/s -cat convert to format -output file output path

It will concatenate differently formatted files.

The formats textutils can read and write to are

txt, html, rtf, rtfd, doc, docx, wordml, odt, or webarchive

Example

/usr/bin/textutil foo1.txt foo2.txt foo1.rtf foo.html -cat txt -output /file/path/foo.txt


If you are talking about plain text files, you can accomplish this in Terminal by running

cat file1.txt file2.txt file3.txt > bigfile.txt