Back to commands

Linux Survival Basics

Read-only

List 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.

demo@lab:~$

$ 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

  1. ls -lh app.db
  2. sqlite3 app.db ".tables"

next steps

Related commands

Linux Survival Basics Can be slow

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
Linux Survival Basics Can be slow

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
Linux Survival Basics Read-only

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.

  • lpic1:103-gnu-unix-commands
  • lfcs:essential-commands
  • risk:read-only

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.