I have few sqlite database files. I want to know the database file version i.e if the database was created with sqlite2 or sqlite3 or any other main/sub version (not the sql
You can get version number of a database file by the Magic Header String:
$ head -c 48 file2.db
** This file contains an SQLite 2.1 database **
$ head -c 16 file3.db
SQLite format 3
The easier way is using the file command:
$ file file2.db
file2.db: SQLite 2.x database
$ file file3.db
file3.db: SQLite 3.x database