Terminal 101: Join Multiple Files Together with Cat

Every Monday, we'll show you how to do something new and simple with Apple's built-in command line application. You don't need any fancy software, or a knowledge of coding to do any of these. All you need is a keyboard to type 'em out!

A few months ago, we covered the piping techniques that can be used to get text from a command and output it to a file on your Mac. This tool is great, but it also has a hidden feature when used along side of the cat command (short for concatenate): you can merge multiple files into one larger file. Continue reading, and we’ll have you concatenating files in no time.

To begin, you’ll want to have multiple files that you can concatenate together. Text files work great, but other file types are also supported, so play around with different filetypes.




Cory Bohon is a freelance technology writer, indie Mac and iOS developer, and amateur photographer. Follow this article's author, Cory Bohon on Twitter.