In SEO we are always dealing with CSVs – combining, cleaning, analyzing – you name it.
In this article (and video) I will show you how to quickly & easily combine and merge multiple CSV files into one CSV file for free on a Mac.
Follow along, and start combining!
If you have multiple CSV or Excel files that you need combined, follow this simple process to get them combined in a flash, using the built in “terminal” on your Mac.
Step 1 – Create a new folder
Create a new folder on your Desktop & put all of your CSV files into the folder.
I will call mine “combine”.
It will look like this:

Caution: Everything in this folder will be combined.
Step 2 – Open Terminal
The program “Terminal” is located in your “Applications” folder under “Utilities”
Applications > Utilities > Terminal

Open Terminal.
It will look like this:

Step 3 – Print Working Directory
This is a fancy name. Don’t worry about it, just follow the steps.
1. Type: "pwd" 2. Hit enter
It will look like this:

“PWD” means “Print Working Directory”. It simply is showing you what “directory” (aka folder”) the Terminal has selected. Don’t worry about it. Just keep following along.
Step 4 – Choose the folder you created
Set your “directory” to the folder you created that has your CSV files in it.
1. Type: "cd /Users/devin/Desktop/combine" 2. Hit enter
Note: you will need to change your file path so it matches your username & folder name

Step 5 – Merge the files
Now you are ready to merge your files.
1. Type: "cat *.csv >combined.csv" 2. Hit enter
It will look like this:

Step 6 – Check your folder
If you followed along correctly, you are done!
Inside your folder there will be a file called “combined.csv”
It will look like this:

Final Thoughts
If you need help with your digital marketing, web hosting, or other services please contact us.
8 thoughts on “How to combine/merge multiple CSV/Excel files for Mac”
Thanks Devin. I wasn’t expecting an article like this here, but it is helpful. You can never have too many useful articles for Apple users.
Thanks! R newbie here, going crazy trying to do this in R… figured there had to be a better way. Probably obvious to most, but non-.csv files (.roi in my case) are ignored, so may not have to make a special file first.
Hi Devin,
This is super helpful, thank you!
I know I can simply delete duplicate values in excel, but is there a simple way of excluding headers?
Thank you.
I am working on a faster solution to this right now, but what I do is apply a filter to the entire sheet, and then ‘sort a-z’ by one of the header terms (so they all get grouped together at the top) and then delete all but 1
Exactly what I needed. Thank you for the clear instructions. It worked without a hitch.
~Andy
Hi Devin,
Newbie at this. Very frustrating at the moment. After setting the directory and I hit enter, I get a message saying no such file or directory. What am I doing wrong?
Dez
Hi Devin,
Thanks for publishing this article. The instructions worked perfect for my needs.
You are welcome 🙂