Results for “Commands & execution context”
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
Rename a practice file
Linux Commands: Rename a practice file using GNU/Linux commands in an empty practice directory.
Linux Commands✓ Tested
Reorder fields with a capture group
Linux Commands: Use extended regular expressions and backreferences to rearrange a known format.
Linux Commands✓ Tested
Replace text in a pipeline
Linux Commands: Replace text in a pipeline using GNU/Linux commands in an empty practice directory.
Linux Commands✓ Tested
Retrieve a file from a stopped container
Docker / Compose: The writable layer remains available for docker cp after exit.
Docker / Compose✓ Tested
Run a command safely for each matching file
Linux Commands: Use find -exec with argument placeholders so spaces in filenames remain intact.
Linux Commands✓ Tested
Run a one-off process with a numeric user ID
Docker / Compose: The user option overrides the image’s default identity.
Docker / Compose✓ Tested
Save a stream while displaying it
Linux Commands: Use tee to write a copy of standard input to a file.
Linux Commands✓ Tested
Search for a literal string
Linux Commands: Use grep -F when the pattern contains regex metacharacters that should be literal.
Linux Commands✓ Tested
Search text without case sensitivity
Linux Commands: Use grep -i to match uppercase and lowercase variants.
Linux Commands✓ Tested
Send command output into another command
Linux Commands: Send command output into another command using GNU/Linux commands in an empty practice directory.
Linux Commands✓ Tested
Set a container’s own hostname
Docker / Compose: hostname changes the name reported inside the container.
Docker / Compose✓ Tested