To combine plain-text files on a Mac, use Terminal’s cat command and redirect the output to a new file. This keeps each file’s contents in the order you specify. If you prefer a visual workflow and have only a few small files, you can also copy their text into one TextEdit document. Choose the method that fits your files, and save the result under a new name so the originals remain intact.

Before combining files

Check that the inputs are text files, such as .txt, and decide their order. Concatenation places their contents end to end; it does not sort paragraphs, remove duplicates, or merge formatting. If the files have headings, decide whether to add separators between sections. The cat command copies the named files to standard output in the order given, which you can redirect to a destination file. GNU’s cat documentation

For example, if the files are chapter-1.txt, chapter-2.txt, and notes.txt in your Documents folder, this command creates combined.txt there:

cat ~/Documents/chapter-1.txt ~/Documents/chapter-2.txt ~/Documents/notes.txt > ~/Documents/combined.txt

Replace those names with your actual filenames. The > sends the command’s output into the destination. It creates the destination if needed, but replaces its existing contents if a file with that name already exists. Use a new destination name, and never use an input filename as the destination: doing so can erase that input before it is read.

Combine files with Terminal

Open Terminal from Applications > Utilities, or find it with Spotlight. Terminal is macOS’s command-line app; Apple’s guide explains how to enter commands and press Return to run them. Apple’s Terminal guide

The simplest way to avoid path and ordering mistakes is to use full file paths, as in the example. A tilde (~) at the beginning of a path stands for your home folder. If a filename or folder name contains spaces, put the whole path in quotation marks, for example "~/Documents/Meeting notes.txt". In shell commands, however, a quoted tilde may not expand as intended; use $HOME instead: "$HOME/Documents/Meeting notes.txt". Apple documents both home-folder paths and specifying file paths in Terminal. Apple’s guide to specifying files and folders

Run the command, then open combined.txt in TextEdit or another text editor and check the section order. If Terminal reports that a file cannot be found, verify its spelling, extension, and folder path. You can use ls ~/Documents to list the files in Documents, then correct the command. Avoid adding wildcards such as *.txt unless you want every matching file included; a wildcard can also pick up an earlier combined output file on a later run.

Check section boundaries and line breaks

cat copies the file contents as they are. It does not insert a heading, blank line, or separator between files. If one file does not end with a newline, the first line of the next file can run directly into its final line. Inspect the boundary in the resulting document. If sections need visible spacing, the reliable approach for a small number of files is to add headings or blank lines while assembling or editing the final document.

The terminal command joins text content, not formatted documents. Rich-text styling, tables, and images are outside this plain-text workflow. For a formatted deliverable, use TextEdit or a word processor to assemble and format the material instead.

Combine a few files in TextEdit

For a small set of files, open each in TextEdit and copy the text into a new document in the chosen order. Insert a heading or blank line between sections if useful, then save the combined copy. TextEdit opens plain-text documents and can save documents as plain text; Apple notes that new documents are rich text by default, and that converting rich text to plain text removes styles and formatting. To keep the result as .txt, choose Format > Make Plain Text before saving, or select Plain Text in TextEdit’s New Document settings. Apple’s TextEdit guide

Use this manual method when reviewing and arranging content matters more than speed. For many files or repeatable ordering, Terminal is more direct. In either workflow, review the finished document for missing text, joined lines, and the intended order before treating it as complete.

Sources