Results for “File operations & integrity”
Small, practical examples. Search by task or narrow things down below.
Create a file without replacing existing data
Create a file without replacing existing data in a complete Rust program using the standard library.
Rust✓ Tested
Create a runtime file during the build
Docker / Compose: RUN executes during the build while CMD executes when a container starts.
Docker / Compose✓ Tested
Create a second name for the same file
Linux Commands: Use ln for a hard link and inspect the shared link count.
Linux Commands✓ Tested
Create a small file at build time
Docker / Compose: Create a small file at build time with a complete introductory Dockerfile.
Docker / Compose✓ Tested
Create an empty file
Linux Commands: Use touch to create a file when absent; an existing file keeps its contents but gets updated timestamps.
Linux Commands✓ Tested
Create an empty practice file
Linux Commands: Create an empty practice file using GNU/Linux commands in an empty practice directory.
Linux Commands✓ Tested
Create and clean up a temporary file
Create and clean up a temporary file using a complete Go program with explicit sample inputs.
Go✓ Tested
Create private files with a restrictive umask
Linux Commands: Apply umask in a subshell so the surrounding shell is unaffected.
Linux Commands✓ Tested
Declare LF normalization for a file type
Git: A gitattributes rule records text normalization expectations for matching paths.
Git✓ Tested
Discard an unstaged edit to one tracked file
Git: Restore copies the index version back into the selected working file.
Git✓ Tested
Encapsulate increment and reset operations
Encapsulate increment and reset operations with a small React component and explicit browser behavior.
React✓ Tested
Encode and decode a file with Base64
Linux Commands: Use GNU base64 for text transport of bytes and --decode for the reverse operation.
Linux Commands✓ Tested