Results for “process”
Small, practical examples. Search by task or narrow things down below.
Copy a file with explicit permissions
Linux Commands: Use install to create parent directories and set the destination mode in one operation.
Linux Commands✓ Tested
Drop all optional Linux capabilities
Docker / Compose: The effective capability mask becomes zero after cap-drop ALL.
Docker / Compose✓ Tested
Format a known UTC timestamp
Linux Commands: Use GNU date -u and an explicit input offset to avoid local timezone dependence.
Linux Commands✓ Tested
Format a zero-padded numeric label
Linux Commands: Use printf formatting instead of concatenating a variable number of zeroes.
Linux Commands✓ Tested
Generate a stepped sequence
Linux Commands: Use seq when a command pipeline needs a numeric sequence.
Linux Commands✓ Tested
Handle a nonzero background-job exit
Bash Scripts: Wait reports a child’s exit code; put it in a conditional when failure is expected.
Bash Scripts✓ Tested
Keep loop state by avoiding a pipeline subshell
Bash Scripts: Redirect input into a while loop so updates to a counter remain in the current shell.
Bash Scripts✓ Tested
Pass a variable to one command
Linux Commands: Use env to supply a child process value without setting it permanently in the parent shell.
Linux Commands✓ Tested
Preserve a failure status while an EXIT trap runs
Bash Scripts: Capture the status immediately on entry to the trap before running cleanup commands.
Bash Scripts✓ Tested
Prevent gaining privileges through exec
Docker / Compose: The no-new-privileges flag is visible in process status.
Docker / Compose✓ Tested
Read an ISO week date
Linux Commands: Use ISO week year, week number, and weekday directives together.
Linux Commands✓ Tested
Remove a variable from one child’s environment
Bash Scripts: env -u removes an inherited value for a single command.
Bash Scripts✓ Tested