Query Contacts database from shell

The database is a SQLite database so take your pick on SQLite clients for querying. The format of the database doesn’t really lend itself too well to being searched directly, depending on what information you need exactly, “given_name” and “family_name” are probably the only useful columns for searching but you might be able to get what you need by doing a “LIKE” match on the vcard column.

For example (using the sqlite3 command line client)…

sqlite3 ~/.local/share/evolution/addressbook/system/contacts.db "SELECT vcard FROM folder_id WHERE vcard LIKE '%FN:Fynnus%'"
2 Likes