FIND YOUR NEXT FEW LINES

Results for “Commands & execution context”

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

187 snippets foundClear filters
Linux CommandsTransforming text

Translate ASCII lowercase letters to uppercase

Linux Commands: Use tr under a fixed locale for predictable ASCII character ranges.

Linux Commands✓ Tested
ReactContext & shared state

Use React 19’s provider shorthand

Use React 19’s provider shorthand with a small React component and explicit browser behavior.

React✓ Tested
Linux CommandsArchive integrity & packaging

Verify a file against a checksum manifest

Linux Commands: Use sha256sum -c with a manifest obtained from a trusted source.

Linux Commands✓ Tested
Linux CommandsGetting Started

Write text to a new practice file

Linux Commands: Write text to a new practice file using GNU/Linux commands in an empty practice directory.

Linux Commands✓ Tested
HTMLImages & embedded documents

Block scripts in an embedded document

HTML: An empty sandbox attribute applies the default set of restrictions, including blocking script execution.

HTML✓ Tested
Linux CommandsArchives & checksums

Calculate a SHA-256 checksum

Calculate a file checksum so you can compare it with a hash from a trusted source and detect changed contents.

checksum✓ Tested
Bash ScriptsProcesses & environment

Change directory only for one operation

Bash Scripts: A subshell makes a temporary directory change without affecting later commands.

Bash Scripts✓ Tested
Bash ScriptsDiagnostics & defensive scripting

Check a script’s syntax without executing its body

Bash Scripts: bash -n parses commands but does not run ordinary script statements.

Bash Scripts✓ Tested
Linux CommandsSystem information

Check available disk space

Show total, used, and available filesystem space for the current directory in human-readable units.

disk✓ Tested
Linux CommandsSystem information

Check memory usage

Show memory and swap totals in human-readable units. The available column estimates memory usable by new applications.

memory✓ Tested
Linux CommandsSystem information

Check the size of a folder

Show a single total for the disk space used by a folder and its contents.

disk usage✓ Tested
PythonFile operations & archives

Clean up a temporary directory automatically

Python: Use TemporaryDirectory as a context manager so cleanup also happens after exceptions.

Python✓ Tested