Results for “Finding & selecting files”
Small, practical examples. Search by task or narrow things down below.
Rename a file with mv
Linux Commands: Rename a known file in the current directory and inspect its new contents.
Linux Commands✓ Tested
Separate a filename extension
Separate a filename extension using a complete Go program with explicit sample inputs.
Go✓ Tested
Set owner-only file permissions
Linux Commands: Use chmod 600 to allow only the owner to read and write a file.
Linux Commands✓ Tested
Set owner-only read and write permissions
C++: Replace ordinary permission bits with the requested owner permissions.
C++✓ Tested
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
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
Write and read bytes without text conversion
C++: Use binary stream modes and check each I/O operation before consuming its result.
C++✓ Tested
Abort a conflicting cherry-pick
Git: Abort removes the incomplete replay and returns to the previous branch state.
Git✓ Tested
Abort a conflicting rebase
Git: Abort returns the branch to its state before the rebase attempt.
Git✓ Tested
Abort a merge with unresolved conflicts
Git: Abort restores the pre-merge state in this clean practice repository.
Git✓ Tested
Add a fixed hostname mapping
Docker / Compose: extra_hosts adds an entry to the container’s hosts file.
Docker / Compose✓ Tested
Add a forgotten file to the latest unpublished commit
Git: Stage the missing file before amending without changing the message.
Git✓ Tested