FIND YOUR NEXT FEW LINES

Results for “write file”

Small, practical examples. Search by task or narrow things down below.

880 snippets foundClear filters
SQLiteTables & writes

Read values from an inserted row

Use RETURNING to retrieve an automatically assigned row ID.

RETURNING✓ Tested
Linux CommandsStreams & byte tools

Save a stream while displaying it

Linux Commands: Use tee to write a copy of standard input to a file.

Linux Commands✓ Tested
Docker / ComposeStorage & isolation

Share data through a named volume

Keep a file across two short-lived containers.

volume✓ Tested
GitBranches & recovery

Undo a commit with a new commit

Reverse a change while preserving shared history.

revert✓ Tested
SQLiteTables & writes

Update a row on conflict

Use a primary key to insert or update one value.

upsert✓ Tested
GitRestoring & revising local work

Add a forgotten file to the latest unpublished commit

Git: Stage the missing file before amending without changing the message.

Git✓ Tested
PythonFiles & paths

Append a line to a file

Add a new line to the end of a text file without replacing its existing contents. Append mode also creates the file if it does not exist.

file✓ Tested
Linux CommandsGetting Started

Append a line to a practice file

Linux Commands: Append a line to a practice file using GNU/Linux commands in an empty practice directory.

Linux Commands✓ Tested
Linux CommandsStreams & byte tools

Append a stream to a log file

Linux Commands: Use tee -a to preserve existing log contents.

Linux Commands✓ Tested
CFiles

Append text to a file

Use append mode in C without replacing the existing file.

C✓ Tested
RustFiles & paths

Append to a file without truncating it

Append to a file without truncating it in a complete Rust program using the standard library.

Rust✓ Tested
Linux CommandsArchive integrity & packaging

Archive filenames safely with null delimiters

Linux Commands: Use find -print0 with tar --null to preserve spaces and embedded newlines in filenames.

Linux Commands✓ Tested