Results for “os”
Small, practical examples. Search by task or narrow things down below.
Handle a missing file without treating it as an empty file
C: Inspect errno after a failed fopen to distinguish the documented missing-path condition.
C✓ Tested
Identify a commit exactly at a release tag
Git: Describe with exact-match refuses to invent a label for a later commit.
Git✓ Tested
Identify whether a name resolves to a builtin
Bash Scripts: type -t reports the command kind without printing a machine-specific path.
Bash Scripts✓ Tested
Ignore a personal scratch file without changing shared rules
Git: The repository-local exclude file applies only to this checkout.
Git✓ Tested
Include every row tied for the highest score
Postgres: Compare with MAX rather than limiting to an arbitrary number of rows.
Postgres✓ Tested
Include missing values in a not-equal filter
Postgres: Ordinary inequality does not include NULL; explicitly include it when that is the intended rule.
Postgres✓ Tested
Include zero counts for missing relationships
Postgres: Count the non-null child key after a left join so a missing relationship produces zero.
Postgres✓ Tested
Increment a stored value in the database
Postgres: An in-database arithmetic update avoids a separate application read-modify-write step.
Postgres✓ Tested
Insert Docker’s small init process
Docker / Compose: The init option adds a PID 1 process that reaps children and forwards signals.
Docker / Compose✓ Tested
Insert only keys absent from a destination
Postgres: NOT EXISTS supports a set-based missing-row insert in a single-writer example.
Postgres✓ Tested
Inspect a completed container’s exit code
Docker / Compose: Inspect a completed container’s exit code using a locally available Ubuntu image.
Docker / Compose✓ Tested
Inspect a user-defined network’s driver
Docker / Compose: The default driver for a local user-defined network is bridge.
Docker / Compose✓ Tested