FIND YOUR NEXT FEW LINES

Results for “Execution & file transfer”

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

848 snippets foundClear filters
Linux CommandsFiles & permissions

Remove an empty directory only

Linux Commands: Use rmdir so a directory containing files cannot be removed accidentally.

Linux Commands✓ Tested
C#File operations & paths

Replace a path extension

C#: Path.ChangeExtension transforms a path string without moving or creating a file.

C#✓ Tested
Docker / ComposeBuild images

Run an image as a non-root user

Choose an unprivileged numeric identity for the default process.

Dockerfile✓ Tested
Docker / ComposeBuild images

Set a working directory

Choose the default directory for later instructions and the running process.

Dockerfile✓ Tested
Docker / ComposeBuild images

Set an image’s default command

Use JSON array syntax for a predictable command.

Dockerfile✓ Tested
C++Filesystem operations

Set owner-only read and write permissions

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

C++✓ Tested
Docker / ComposeDockerfile patterns

Use a build argument while creating an image

Docker / Compose: ARG supplies a build-time value that is not automatically a runtime environment variable.

Docker / Compose✓ Tested
JavaFile operations & binary data

Write and read binary bytes

Java: Use the byte-oriented Files methods when text encoding should not be involved.

Java✓ 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
C#File operations & paths

Write and read raw bytes

C#: Use the byte-oriented file APIs when no text encoding should be applied.

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