How do I know where is a specific contact stored by Apple Contacts.app? I am using multiple contact storages, like Gmail or Exchange and I want to know where a contact is stored, so I can remove the right duplicate.

Also I would like to know how can I move a contact from one addressbook to another: from example moving from Exchange to Gmail.

Note: this question applies to OS X 10.9.1
The Contacts database is stored in a single SQLite3 database per source. You can find a list of databases by running the following command:

find ~/Library/Application\ Support/AddressBook/ -name "AddressBook-v22.abcddb"


These databases can be exported using

sqlite3 /path/to/AddressBook-v22.abcddb .dump &gt; ~/Desktop/export


The export can be searched using a text editor or Numbers.

I wouldn't recommend editing the SQLite database directly though.