LinuxQuestions.org
Register a domain and help support LQ
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices

Reply
 
Search this Thread
Old 01-11-2010, 08:09 PM   #1
SChipS
Member
 
Registered: Mar 2005
Posts: 54

Rep: Reputation: 15
Search (not Browser) history, where is the file located in Firefox ?


Is it possible to locate the Firefox file that retains "Search" history (not particularly "Browser" history)?

I have lost a hardcopy list of authors and titles of books/ebooks that I search the web for. However, most of the time when I would enter a name or title a drop down list would have that entry I wanted, and I could just click on it. That drop down list is what I am calling "Search" history.

I'd like to find that file and print it out.

Using Ubuntu 8.10.

Thank you,

Last edited by SChipS; 01-12-2010 at 09:21 PM. Reason: solved
 
Click here to see the post LQ members have rated as the most helpful post in this thread.
Old 01-11-2010, 11:57 PM   #2
Elemecca
Member
 
Registered: Nov 2008
Location: San Francisco, CA
Distribution: Gentoo, CentOS
Posts: 71

Rep: Reputation: 22
Firefox stores its search bar history with all the other form history in an SQLite database in the 'formhistory.sqlite' file in your profile directory. Your profile directory is in '~/.mozilla/firefox'. It has a name of the form 'random-id.name'.

Running the following command from inside your profile directory will dump your search bar history to the file 'searches.txt' in your home directory.
Code:
echo "SELECT value FROM moz_formhistory WHERE fieldname='searchbar-history';" | sqlite3 formhistory.sqlite > ~/searches.txt
 
2 members found this post helpful.
Old 01-12-2010, 07:50 AM   #3
SChipS
Member
 
Registered: Mar 2005
Posts: 54

Original Poster
Rep: Reputation: 15
Elemecca,

Thank you for that detailed reply!!!

I had a look inside 'formhistory.sqlite' with a hex editor just before running your code and it looks like the information I'm looking for does reside there as you correctly stated. The file is large, as it should be with all the searching I've done.

With one exception the code worked wonderfully and the resulting file 'searches.txt' was created in my home directory.

However, the resulting, 'searches.txt', gave me only two very small lines which were indeed past search-bar searches. Any hints as to how I can dump all the info in that file to a text file? Possibly use other 'fieldnames' since much of the searching is done on other websites using their search-bar. (I have no idea of other fieldname options)

Thank you kindly for your efforts on my behalf, and have a Great Day !
 
Old 01-12-2010, 08:33 AM   #4
SChipS
Member
 
Registered: Mar 2005
Posts: 54

Original Poster
Rep: Reputation: 15
Thanks to Elemecca my search list has been restored !!!

Elemecca put me onto a command line argument which resulted in the creation of readable information from the 'formhistory.sqlite' file.

To get all the information desired the original code above was altered to:

echo "SELECT value FROM moz_formhistory;" | sqlite3 formhistory.sqlite > ~/searches.txt

This created the file 'searches.txt' with all the search history.

Thanks again Elemecca, without your input this would remain an unsolved problem.

:-)
 
Old 01-12-2010, 09:06 PM   #5
Elemecca
Member
 
Registered: Nov 2008
Location: San Francisco, CA
Distribution: Gentoo, CentOS
Posts: 71

Rep: Reputation: 22
You're welcome. Please edit your original post and add "[SOLVED]" to the beginning of the subject. That way people looking to help know you no longer need it and people looking for solutions know you found one.
 
Old 01-12-2010, 09:24 PM   #6
SChipS
Member
 
Registered: Mar 2005
Posts: 54

Original Poster
Rep: Reputation: 15
Absolutely ! :-)

Thanks again !

Chip
 
Old 05-23-2010, 01:11 PM   #7
tiggertie
LQ Newbie
 
Registered: May 2010
Posts: 11

Rep: Reputation: 0
Question

Quote:
Originally Posted by SChipS View Post
Elemecca,

Thank you for that detailed reply!!!

I had a look inside 'formhistory.sqlite' with a hex editor just before running your code and it looks like the information I'm looking for does reside there as you correctly stated. The file is large, as it should be with all the searching I've done.

With one exception the code worked wonderfully and the resulting file 'searches.txt' was created in my home directory.

However, the resulting, 'searches.txt', gave me only two very small lines which were indeed past search-bar searches. Any hints as to how I can dump all the info in that file to a text file? Possibly use other 'fieldnames' since much of the searching is done on other websites using their search-bar. (I have no idea of other fieldname options)

Thank you kindly for your efforts on my behalf, and have a Great Day !


Hi elmecca, can you pls help.
I am trying get a list of all the browser history. and excuting the search on Formhistory only shows couple of lines of text and not the entire content. is ther another sqlite database for browser history?

may thanks in advance
 
Old 05-23-2010, 01:54 PM   #8
SChipS
Member
 
Registered: Mar 2005
Posts: 54

Original Poster
Rep: Reputation: 15
tiggertie,

Have you tried this from the CLI:


echo "SELECT value FROM moz_formhistory;" | sqlite3 formhistory.sqlite > ~/searches.txt
 
Old 05-23-2010, 02:25 PM   #9
tiggertie
LQ Newbie
 
Registered: May 2010
Posts: 11

Rep: Reputation: 0
Quote:
Originally Posted by SChipS View Post
tiggertie,

Have you tried this from the CLI:


echo "SELECT value FROM moz_formhistory;" | sqlite3 formhistory.sqlite > ~/searches.txt

Thanks S chips for the fast reply.
Yes I did. Unfortunately I have a rescued linux partition image, which i have mounted as ext2 file system. I traversed through the directory, and executed this query, since content is so less, I am assuming there must be more browser content. ANy help?
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
help with designing Java program:file browser w/ regex search, possibly media player? jmd9qs Programming 0 11-02-2009 07:11 PM
tcsh: can you save the history from multiple shells to one history file? BrianK General 2 04-23-2009 06:19 AM
search broken in file browser emoore Linux - Newbie 2 10-22-2007 01:20 AM
Firefox History.dat file raysr Linux - Software 0 11-12-2004 10:37 PM
How to make Mozilla Firefox my default file browser? jato Linux - Software 2 03-30-2004 12:33 PM


All times are GMT -5. The time now is 06:17 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration