Is there any command or short-cut for saving evolution contacts as separate .vcf files rather than a list.vcf in Ubuntu 10.04?


This can be easily achieved using syncevolution.


Install latest version of syncevolution from repo:

sudo add-apt-repository deb http://downloads.syncevolution.org/apt stable main
sudo apt-get update
sudo apt-get install syncevolution-evolution

syncevolution has a --print-items command which shows each contact name & id for a perticular database (evolution contact list; default is Personal)


To view all databases(evolution-conatct-list local or online) run this command in terminal:

syncevolution --print-databases

Copy the database name.


Now Run following command at teminal-prompt with the database name:

syncevolution --print-items backend=evolution-contacts database=Personal

You can replace Personal with any other contact-list in evolution.

The output would be something like this:

pas-id-5006660000000D81: Tony Stark
pas-id-5017A30900000670: Hockeye
pas-id-51717EFD00000096: Hulk
pas-id-5194ABA900000000: Syncevolution


Now export each contact as separate vcf file (pas-id would be names of the files).For Tony stark it would be:

syncevolution --export Tony-Stark.vcf backend=evolution-contacts database=Personal --luids pas-id-5006660000000D81 

To export all contacts at the same time run without luids parameter:

syncevolution --export ~/Desktop/allcontacts/ backend=evolution-contacts database=Personal

It will export all contacts in ~/Desktop/allcontacts directory.

I have craete a simple script which exoprt all contacts as file with their names(as firstnames-lastname.vcf).


mkdir ~/Desktop/allcontacts/
cd ~/Desktop/allcontacts/

syncevolution --print-items backend=evolution-contacts database=Personal >database
cat database | while read line
 passid=`echo $line | awk -F: '{print $1}'`
 name=`echo $line | awk -F\  '{print $2"-"$NF}'`
 syncevolution --export allcontacts/"$name".vcf backend=evolution-contacts database=Personal --luids "$passid"

Save the script in gedit as vcf-export. Then run:

chmod a+x vcf-export

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.