sqlite3 -readonly app.db 'SELECT * FROM users;'

Category: Databases & SQL

sqlite3 -readonly app.db 'SELECT * FROM users;'

Open a database read-only

Guarantees the database file is never modified, even by mis-typed writes — safe for inspecting a live production file. Related: .backup.
Looking for more? Search all 7,657 commands — works offline, in English or Spanish, and fixes typos.