Results for “File operations & binary data”
Small, practical examples. Search by task or narrow things down below.
Set a service’s open-file limit
Docker / Compose: The ulimits mapping defines soft and hard resource limits.
Docker / Compose✓ Tested
Set copied files’ numeric ownership
Docker / Compose: COPY --chown sets ownership while adding the file.
Docker / Compose✓ Tested
Set owner-only file permissions
Linux Commands: Use chmod 600 to allow only the owner to read and write a file.
Linux Commands✓ Tested
Set the open-file limit for a process
Docker / Compose: The nofile ulimit sets soft and hard file descriptor limits.
Docker / Compose✓ Tested
Show the first lines of a file
Read only the first three lines of a text file, useful for checking a header or previewing a large log.
head✓ Tested
Split a file into fixed line-count pieces
Linux Commands: Use numeric suffixes for predictable filenames when splitting a large text file.
Linux Commands✓ Tested
Stage a new file
Git: Stage a new file inside the disposable repository created by the input setup.
Git✓ Tested
Stage a tracked file rename
Git: Stage a tracked file rename inside the disposable repository created by the input setup.
Git✓ Tested
Stage one file
Add one changed file to the next commit.
add✓ Tested
Stash edits to one chosen file
Git: A pathspec limits the stash to selected paths while other changes remain in the working tree.
Git✓ Tested
Stop tracking a generated file while keeping it locally
Git: Removing a path from the index leaves its working copy intact when cached is specified.
Git✓ Tested
Supply a non-secret configuration file
Docker / Compose: A Compose config mounts a declared file into the service.
Docker / Compose✓ Tested