Results for “File operations & binary data”
Small, practical examples. Search by task or narrow things down below.
Make a second copy of a practice file
Linux Commands: Make a second copy of a practice file using GNU/Linux commands in an empty practice directory.
Linux Commands✓ Tested
Match any pattern from a file
Linux Commands: Use grep -F -f with one literal pattern per line.
Linux Commands✓ Tested
Match filenames without case sensitivity
Linux Commands: Use iname for a case-insensitive filename pattern.
Linux Commands✓ Tested
Override an env-file value explicitly
Docker / Compose: The environment section takes precedence over env_file.
Docker / Compose✓ Tested
Paint a gradient without an image file
CSS: Linear-gradient generates a CSS background image from color stops.
CSS✓ Tested
Pass data through props
Pass data through props with a small React component and explicit browser behavior.
React✓ Tested
Pass filenames with spaces through xargs
Linux Commands: Use null delimiters end to end instead of splitting filenames on whitespace.
Linux Commands✓ Tested
Post URL-encoded form data
jQuery: post sends a data object as form-encoded fields by default.
jQuery✓ Tested
Prevent a variable value from expanding as a filename pattern
Bash Scripts: Quote a variable to pass its literal contents even when matching filenames exist.
Bash Scripts✓ Tested
Preview removal of an untracked scratch file
Git: The dry-run flag shows what clean would remove without deleting it.
Git✓ Tested
Print the final lines of a file
Linux Commands: Use tail -n for a fixed-size suffix of a log.
Linux Commands✓ Tested
Protect a Compose service’s root filesystem
Docker / Compose: read_only rejects writes to the image filesystem.
Docker / Compose✓ Tested