Linux Survival Basics
Read-onlyList Tables in a SQLite Database
You need a quick inventory of tables in a SQLite database.
Command
sqlite3 app.db ".tables"
Before you run this
System impact: Read-only. Low when scoped to the shown target.
When not to use it: Do not use it to inspect views or detailed schema; follow up with .schema.
Expected output
A compact list of table names in the database.
System impact
Read-only. Nothing changes. The command asks SQLite to list table names.
Recovery / rollback: no state is changed.
When to use it
Use when you inherit a SQLite file or need quick orientation during debugging.
When not to use it
Do not use it to inspect views or detailed schema; follow up with .schema.
Watch this command run
Command transcript
This sanitized transcript shows the commands and output shape without exposing host details.
$ ls -lh app.db
-rw-r--r-- 1 root root 16 Jun 26 00:27 app.db
$ sqlite3 app.db ".tables"
events orders schema_migrations users
View commands shown
These are the commands shown in the sanitized transcript.
Commands shown
ls -lh app.dbsqlite3 app.db ".tables"
next steps
Related commands
See Which Packages Want Updates
Before you upgrade anything, list what would move.
apt list --upgradable
List Contents of a Backup Tarball
You can inspect an archive without extracting it.
tar -tf archives/site-backup.tar | sort | head
Count Source Files by Extension
A quick extension count can show whether expected content made it into the source tree.
find source -type f -printf '%f\n' | sed -n 's/.*\.//p' | sort | uniq -c | sort -nr
Count Failures by Test File
Turn noisy test logs into a ranked failure list.
grep -RhoE '[A-Za-z0-9_./-]+\.(test|spec)\.(js|ts|py|rb)' logs/ | sort | uniq -c | sort -nr | head
Fingerprint a Debian or Ubuntu Host
Before package triage, prove what OS family and release you are actually on.
. /etc/os-release && printf '%s %s %s\n' "$ID" "$VERSION_ID" "$VERSION_CODENAME"
Study mapping
Use this as independent command practice: read the notes, predict the output, then compare it with the example before using a real shell.
Useful for
- LPIC-1 style command-line practice
- LFCS style performance tasks
- Linux+ style troubleshooting review
Independent study support only. No affiliation, endorsement, exam dumps, or real exam questions.