How to Merge Multiple .vcf Files Into a Single .vcf File Using Command Line in Any Linux Distro

Command line is the most powerful tool there is, in Linux. You can do anything and everything with the command line utility tools under Linux. cat is an awesome command line utility tool. It’s used to concatenate files. I had 300+ contact numbers in separate .vcf files and Google Contacts only allows to import only one .vcf file at a time. And apparently it’s next to impossible for a guy like me to import those 300+ .vcf files one by one. Therefore, I needed to convert those .vcf files into a single .vcf file so that I could import them in Google Contacts. I searched the net and found some solution on how to do that using Windows. And I thought if one can do this on Windows, then it’s a sure shot for Linux. And then a thought came to my mind.

I was familiar with the cat command. And I knew it’s power. I just executed the command using cat and voila!

So here’s the format to merge multiple .vcf file into a single .vcf file:

cat *.vcf > mergedfile.vcf

Here, the asterisk (*) mark denotes every file names ended with .vcf extension. And you can give any name to your merged file.

Copy all the files to a single folder/directory before executing the command. And make sure to direct your terminal to that directory i.e. open terminal window in that folder.

Use man cat in terminal to know more about the cat command.


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s