FIND YOUR NEXT FEW LINES

Results for “Finding & selecting files”

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

368 snippets foundClear filters
Linux CommandsFiles & permissions

Rename a file with mv

Linux Commands: Rename a known file in the current directory and inspect its new contents.

Linux Commands✓ Tested
GoFiles & paths

Separate a filename extension

Separate a filename extension using a complete Go program with explicit sample inputs.

Go✓ Tested
Linux CommandsFiles & permissions

Set owner-only file permissions

Linux Commands: Use chmod 600 to allow only the owner to read and write a file.

Linux Commands✓ Tested
C++Filesystem operations

Set owner-only read and write permissions

C++: Replace ordinary permission bits with the requested owner permissions.

C++✓ Tested
GoFiles & paths

Write and read a UTF-8 file

Write and read a UTF-8 file using a complete Go program with explicit sample inputs.

Go✓ Tested
RustFiles & paths

Write and read a UTF-8 file

Write and read a UTF-8 file in a complete Rust program using the standard library.

Rust✓ Tested
C++Filesystem operations

Write and read bytes without text conversion

C++: Use binary stream modes and check each I/O operation before consuming its result.

C++✓ Tested
GitMerging & replaying changes

Abort a conflicting cherry-pick

Git: Abort removes the incomplete replay and returns to the previous branch state.

Git✓ Tested
GitMerging & replaying changes

Abort a conflicting rebase

Git: Abort returns the branch to its state before the rebase attempt.

Git✓ Tested
GitMerging & replaying changes

Abort a merge with unresolved conflicts

Git: Abort restores the pre-merge state in this clean practice repository.

Git✓ Tested
Docker / ComposeCompose service options

Add a fixed hostname mapping

Docker / Compose: extra_hosts adds an entry to the container’s hosts file.

Docker / Compose✓ 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