LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux Mint (https://www.linuxquestions.org/questions/linux-mint-84/)
-   -   Thunderbird Address Book location (https://www.linuxquestions.org/questions/linux-mint-84/thunderbird-address-book-location-4175732094/)

borgward 12-23-2023 12:43 PM

Thunderbird Address Book location
 
Linuxmint 21.2 Cinnamon
Where is the Thunderbird address book located in the file system?

bathory 12-23-2023 04:09 PM

Quote:

Originally Posted by borgward (Post 6472293)
Linuxmint 21.2 Cinnamon
Where is the Thunderbird address book located in the file system?

It should be in a file named abook.sqlite
It's located at ~/.thunderbird/<some random string>/abook.sqlite

Regards

borgward 12-23-2023 07:53 PM

What do I read t with?

frankbell 12-23-2023 08:49 PM

Based on the file name, some sort of SQL engine, that is, a program to parse SQL databases.

If you want to open it, it might be a good idea to make a copy, then work with the copy.

bathory 12-24-2023 01:50 AM

Quote:

Originally Posted by borgward (Post 6472338)
What do I read t with?

Use sqlite3 to export it in sql:
Code:

sqlite3 ~/.thunderbird/<some random string>/abook.sqlite .dump > address.sql

borgward 12-24-2023 09:28 AM

sqlite3 ~/.thunderbird/svyc3qyi.default-release /abook.sqlite .dump > address.sql
Error: unable to open database "/home/tom/.thunderbird/svyc3qyi.default-release": unable to open database file

also tried:
~$ sqlite3 ~/.thunderbird/svyc3qyi.default-release /abook.sqlite-wal .dump > address.sql
Error: unable to open database "/home/tom/.thunderbird/svyc3qyi.default-release": unable to open database file

I had to install sqlite3. After the above attempts I restarted the computer but still got the same results.

bathory 12-24-2023 11:23 AM

Quote:

Originally Posted by borgward (Post 6472422)
sqlite3 ~/.thunderbird/svyc3qyi.default-release /abook.sqlite .dump > address.sql
Error: unable to open database "/home/tom/.thunderbird/svyc3qyi.default-release": unable to open database file

also tried:
~$ sqlite3 ~/.thunderbird/svyc3qyi.default-release /abook.sqlite-wal .dump > address.sql
Error: unable to open database "/home/tom/.thunderbird/svyc3qyi.default-release": unable to open database file

I had to install sqlite3. After the above attempts I restarted the computer but still got the same results.

There is a blank space after svyc3qyi.default-release in the path to abook.sqlite above (i.e. /home/tom/.thunderbird/svyc3qyi.default-release /abook.sqlite).
I don't know if it should exist there, so check carefully if you use the correct path to abook.sqlite.

Also it could be that you don't have permissions to read that file.
What gives:
Code:

ls -l ~/.thunderbird/svyc3qyi.default-release/abook.sqlite

borgward 12-24-2023 11:28 AM

tom@tom-iMac:~$ ls -l ~/.thunderbird/svyc3qyi.default-release/abook.sqlite
-rw-r--r-- 1 tom tom 262144 Dec 23 12:20 /home/tom/.thunderbird/svyc3qyi.default-release/abook.sqlite

tom@tom-iMac:~$ sudo sqlite3 /home/tom/.thunderbird/svyc3qyi.default-release/abook.sqlite .dump > address.sql
tom@tom-iMac:~$
Nada!

tom@tom-iMac:~$ sudo sqlite3 /home/tom/.thunderbird/svyc3qyi.default-release /abook.sqlite .dump > address.sql
Error: unable to open database "/home/tom/.thunderbird/svyc3qyi.default-release": unable to open database file

bathory 12-24-2023 11:58 AM

Quote:

tom@tom-iMac:~$ sudo sqlite3 /home/tom/.thunderbird/svyc3qyi.default-release/abook.sqlite .dump > address.sql
tom@tom-iMac:~$
Nada!
No nada! That worked!

Check the file address.sql created in the directory from where you ran the sqlite3 command.
Apparently the blank space in the abook.sqlite path is the culprit.

borgward 12-24-2023 12:30 PM

without space:
tom@tom-iMac:~$ sqlite3 /home/tom/.thunderbird/svyc3qyi.default-release/abook.sqlite .dump > address.sql
Nothing returns

With space:
tom@tom-iMac:~$ sqlite3 /home/tom/.thunderbird/svyc3qyi.default-release/ abook.sqlite .dump > address.sql
Error: unable to open database "/home/tom/.thunderbird/svyc3qyi.default-release/": unable to open database file

Which space? / abook.sqlite or abook.sqlite .dump ?

bathory 12-24-2023 12:43 PM

Quote:

tom@tom-iMac:~$ sqlite3 /home/tom/.thunderbird/svyc3qyi.default-release/abook.sqlite .dump > address.sql
Nothing returns
Nothing returns, means that the command output is written in the address.sql file!!!

If you want to see the output just omit the redirection:
Code:

sqlite3 /home/tom/.thunderbird/svyc3qyi.default-release/abook.sqlite .dump

borgward 12-24-2023 12:52 PM

That worked.

bathory 12-24-2023 03:54 PM

Quote:

Originally Posted by borgward (Post 6472464)
That worked.

Of course it did!
I thought that you knew the meaning of ">", i.e. redirecting a command output to a file

Anyway, you can mark the thread "Solved" from the "Thread Tools" on top of the page.

Cheers

borgward 12-24-2023 04:27 PM

No, I did not know the meaning of > . was going to ask. It directs command output to a file. A | directs output to another command.


All times are GMT -5. The time now is 09:38 AM.