How to open and read SQLite files

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP








up vote
0
down vote

favorite












I am trying to recover something from Mozilla Firefox history, and grep returns lots of binary files, I think they come from sqlite content. How can I view them in human-readable form, as text? At the top of the file I see something like
SQLite format 3










share|improve this question



























    up vote
    0
    down vote

    favorite












    I am trying to recover something from Mozilla Firefox history, and grep returns lots of binary files, I think they come from sqlite content. How can I view them in human-readable form, as text? At the top of the file I see something like
    SQLite format 3










    share|improve this question

























      up vote
      0
      down vote

      favorite









      up vote
      0
      down vote

      favorite











      I am trying to recover something from Mozilla Firefox history, and grep returns lots of binary files, I think they come from sqlite content. How can I view them in human-readable form, as text? At the top of the file I see something like
      SQLite format 3










      share|improve this question















      I am trying to recover something from Mozilla Firefox history, and grep returns lots of binary files, I think they come from sqlite content. How can I view them in human-readable form, as text? At the top of the file I see something like
      SQLite format 3







      text binary sqlite






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Apr 18 at 1:20









      thomasrutter

      25.4k46086




      25.4k46086










      asked Apr 17 at 23:38









      Baron Yugovich

      11616




      11616




















          2 Answers
          2






          active

          oldest

          votes

















          up vote
          1
          down vote













          I don't think there's any general way to turn an arbitrary binary file into human-readable form - you would need to know the byte-by-byte format in order to unpack and convert it. (There is the strings utility, but that will only extract ASCII sequences that happen to be embedded in the file).



          In the specific case of Mozilla Firefox, it appears to use SQLite 3 - this is likely what you are seeing at the top of the file - this is one time where strings is useful:



          $ strings ~/.mozilla/firefox/dhjktlo7.default/storage.sqlite
          SQLite format 3


          although you could also use the file command to identify the content type:



          $ file -b ~/.mozilla/firefox/dhjktlo7.default/storage.sqlite
          SQLite 3.x database, user version 65536, last written using SQLite version 3013000


          Probably the best way to display / search these specific files is to use the sqlite3 command line client (from package sqlite3) to .dump them e.g.



          $ sqlite3 ~/.mozilla/firefox/dhjktlo7.default/storage.sqlite .dump
          PRAGMA foreign_keys=OFF;
          BEGIN TRANSACTION;
          COMMIT;





          share|improve this answer




















          • Then after you dump everything you can grep if there are multiple files?
            – WinEunuuchs2Unix
            Apr 18 at 1:26











          • Thanks, any idea on this though stackoverflow.com/questions/49889122/…
            – Baron Yugovich
            Apr 18 at 1:40

















          up vote
          1
          down vote













          SQLite is a type of relational database, so that file will contain tables, columns and indexes.



          sqlitebrowser is a GUI based application that lets you browse inside SQLite files.



          Of course you can simply install sqlite3 itself and use the sqlite3 command-line tool to open the database.






          share|improve this answer




















          • Thanks, do you happen to have any idea on stackoverflow.com/questions/49889122/…
            – Baron Yugovich
            Apr 18 at 1:39










          Your Answer







          StackExchange.ready(function()
          var channelOptions =
          tags: "".split(" "),
          id: "89"
          ;
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function()
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled)
          StackExchange.using("snippets", function()
          createEditor();
          );

          else
          createEditor();

          );

          function createEditor()
          StackExchange.prepareEditor(
          heartbeatType: 'answer',
          convertImagesToLinks: true,
          noModals: false,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: 10,
          bindNavPrevention: true,
          postfix: "",
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          );



          );













           

          draft saved


          draft discarded


















          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1025964%2fhow-to-open-and-read-sqlite-files%23new-answer', 'question_page');

          );

          Post as a guest






























          2 Answers
          2






          active

          oldest

          votes








          2 Answers
          2






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes








          up vote
          1
          down vote













          I don't think there's any general way to turn an arbitrary binary file into human-readable form - you would need to know the byte-by-byte format in order to unpack and convert it. (There is the strings utility, but that will only extract ASCII sequences that happen to be embedded in the file).



          In the specific case of Mozilla Firefox, it appears to use SQLite 3 - this is likely what you are seeing at the top of the file - this is one time where strings is useful:



          $ strings ~/.mozilla/firefox/dhjktlo7.default/storage.sqlite
          SQLite format 3


          although you could also use the file command to identify the content type:



          $ file -b ~/.mozilla/firefox/dhjktlo7.default/storage.sqlite
          SQLite 3.x database, user version 65536, last written using SQLite version 3013000


          Probably the best way to display / search these specific files is to use the sqlite3 command line client (from package sqlite3) to .dump them e.g.



          $ sqlite3 ~/.mozilla/firefox/dhjktlo7.default/storage.sqlite .dump
          PRAGMA foreign_keys=OFF;
          BEGIN TRANSACTION;
          COMMIT;





          share|improve this answer




















          • Then after you dump everything you can grep if there are multiple files?
            – WinEunuuchs2Unix
            Apr 18 at 1:26











          • Thanks, any idea on this though stackoverflow.com/questions/49889122/…
            – Baron Yugovich
            Apr 18 at 1:40














          up vote
          1
          down vote













          I don't think there's any general way to turn an arbitrary binary file into human-readable form - you would need to know the byte-by-byte format in order to unpack and convert it. (There is the strings utility, but that will only extract ASCII sequences that happen to be embedded in the file).



          In the specific case of Mozilla Firefox, it appears to use SQLite 3 - this is likely what you are seeing at the top of the file - this is one time where strings is useful:



          $ strings ~/.mozilla/firefox/dhjktlo7.default/storage.sqlite
          SQLite format 3


          although you could also use the file command to identify the content type:



          $ file -b ~/.mozilla/firefox/dhjktlo7.default/storage.sqlite
          SQLite 3.x database, user version 65536, last written using SQLite version 3013000


          Probably the best way to display / search these specific files is to use the sqlite3 command line client (from package sqlite3) to .dump them e.g.



          $ sqlite3 ~/.mozilla/firefox/dhjktlo7.default/storage.sqlite .dump
          PRAGMA foreign_keys=OFF;
          BEGIN TRANSACTION;
          COMMIT;





          share|improve this answer




















          • Then after you dump everything you can grep if there are multiple files?
            – WinEunuuchs2Unix
            Apr 18 at 1:26











          • Thanks, any idea on this though stackoverflow.com/questions/49889122/…
            – Baron Yugovich
            Apr 18 at 1:40












          up vote
          1
          down vote










          up vote
          1
          down vote









          I don't think there's any general way to turn an arbitrary binary file into human-readable form - you would need to know the byte-by-byte format in order to unpack and convert it. (There is the strings utility, but that will only extract ASCII sequences that happen to be embedded in the file).



          In the specific case of Mozilla Firefox, it appears to use SQLite 3 - this is likely what you are seeing at the top of the file - this is one time where strings is useful:



          $ strings ~/.mozilla/firefox/dhjktlo7.default/storage.sqlite
          SQLite format 3


          although you could also use the file command to identify the content type:



          $ file -b ~/.mozilla/firefox/dhjktlo7.default/storage.sqlite
          SQLite 3.x database, user version 65536, last written using SQLite version 3013000


          Probably the best way to display / search these specific files is to use the sqlite3 command line client (from package sqlite3) to .dump them e.g.



          $ sqlite3 ~/.mozilla/firefox/dhjktlo7.default/storage.sqlite .dump
          PRAGMA foreign_keys=OFF;
          BEGIN TRANSACTION;
          COMMIT;





          share|improve this answer












          I don't think there's any general way to turn an arbitrary binary file into human-readable form - you would need to know the byte-by-byte format in order to unpack and convert it. (There is the strings utility, but that will only extract ASCII sequences that happen to be embedded in the file).



          In the specific case of Mozilla Firefox, it appears to use SQLite 3 - this is likely what you are seeing at the top of the file - this is one time where strings is useful:



          $ strings ~/.mozilla/firefox/dhjktlo7.default/storage.sqlite
          SQLite format 3


          although you could also use the file command to identify the content type:



          $ file -b ~/.mozilla/firefox/dhjktlo7.default/storage.sqlite
          SQLite 3.x database, user version 65536, last written using SQLite version 3013000


          Probably the best way to display / search these specific files is to use the sqlite3 command line client (from package sqlite3) to .dump them e.g.



          $ sqlite3 ~/.mozilla/firefox/dhjktlo7.default/storage.sqlite .dump
          PRAGMA foreign_keys=OFF;
          BEGIN TRANSACTION;
          COMMIT;






          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered Apr 18 at 1:18









          steeldriver

          62.9k1197165




          62.9k1197165











          • Then after you dump everything you can grep if there are multiple files?
            – WinEunuuchs2Unix
            Apr 18 at 1:26











          • Thanks, any idea on this though stackoverflow.com/questions/49889122/…
            – Baron Yugovich
            Apr 18 at 1:40
















          • Then after you dump everything you can grep if there are multiple files?
            – WinEunuuchs2Unix
            Apr 18 at 1:26











          • Thanks, any idea on this though stackoverflow.com/questions/49889122/…
            – Baron Yugovich
            Apr 18 at 1:40















          Then after you dump everything you can grep if there are multiple files?
          – WinEunuuchs2Unix
          Apr 18 at 1:26





          Then after you dump everything you can grep if there are multiple files?
          – WinEunuuchs2Unix
          Apr 18 at 1:26













          Thanks, any idea on this though stackoverflow.com/questions/49889122/…
          – Baron Yugovich
          Apr 18 at 1:40




          Thanks, any idea on this though stackoverflow.com/questions/49889122/…
          – Baron Yugovich
          Apr 18 at 1:40












          up vote
          1
          down vote













          SQLite is a type of relational database, so that file will contain tables, columns and indexes.



          sqlitebrowser is a GUI based application that lets you browse inside SQLite files.



          Of course you can simply install sqlite3 itself and use the sqlite3 command-line tool to open the database.






          share|improve this answer




















          • Thanks, do you happen to have any idea on stackoverflow.com/questions/49889122/…
            – Baron Yugovich
            Apr 18 at 1:39














          up vote
          1
          down vote













          SQLite is a type of relational database, so that file will contain tables, columns and indexes.



          sqlitebrowser is a GUI based application that lets you browse inside SQLite files.



          Of course you can simply install sqlite3 itself and use the sqlite3 command-line tool to open the database.






          share|improve this answer




















          • Thanks, do you happen to have any idea on stackoverflow.com/questions/49889122/…
            – Baron Yugovich
            Apr 18 at 1:39












          up vote
          1
          down vote










          up vote
          1
          down vote









          SQLite is a type of relational database, so that file will contain tables, columns and indexes.



          sqlitebrowser is a GUI based application that lets you browse inside SQLite files.



          Of course you can simply install sqlite3 itself and use the sqlite3 command-line tool to open the database.






          share|improve this answer












          SQLite is a type of relational database, so that file will contain tables, columns and indexes.



          sqlitebrowser is a GUI based application that lets you browse inside SQLite files.



          Of course you can simply install sqlite3 itself and use the sqlite3 command-line tool to open the database.







          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered Apr 18 at 1:29









          thomasrutter

          25.4k46086




          25.4k46086











          • Thanks, do you happen to have any idea on stackoverflow.com/questions/49889122/…
            – Baron Yugovich
            Apr 18 at 1:39
















          • Thanks, do you happen to have any idea on stackoverflow.com/questions/49889122/…
            – Baron Yugovich
            Apr 18 at 1:39















          Thanks, do you happen to have any idea on stackoverflow.com/questions/49889122/…
          – Baron Yugovich
          Apr 18 at 1:39




          Thanks, do you happen to have any idea on stackoverflow.com/questions/49889122/…
          – Baron Yugovich
          Apr 18 at 1:39

















           

          draft saved


          draft discarded















































           


          draft saved


          draft discarded














          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1025964%2fhow-to-open-and-read-sqlite-files%23new-answer', 'question_page');

          );

          Post as a guest













































































          Popular posts from this blog

          pylint3 and pip3 broken

          Missing snmpget and snmpwalk

          How to enroll fingerprints to Ubuntu 17.10 with VFS491