FIND YOUR NEXT FEW LINES

Results for “File operations & archives”

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

947 snippets foundClear filters
Docker / ComposeLimits & process security

Set the open-file limit for a process

Docker / Compose: The nofile ulimit sets soft and hard file descriptor limits.

Docker / Compose✓ Tested
Linux CommandsText processing

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
Linux CommandsStreams & byte tools

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
GitGetting Started

Stage a new file

Git: Stage a new file inside the disposable repository created by the input setup.

Git✓ Tested
GitGetting Started

Stage a tracked file rename

Git: Stage a tracked file rename inside the disposable repository created by the input setup.

Git✓ Tested
GitWorking tree & staging

Stage one file

Add one changed file to the next commit.

add✓ Tested
GitStashing selected work

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
GitRestoring & revising local work

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
Docker / ComposeCompose service options

Supply a non-secret configuration file

Docker / Compose: A Compose config mounts a declared file into the service.

Docker / Compose✓ Tested
GitBranches & recovery

Temporarily store tracked-file edits

Restore a clean working tree and then reapply your saved changes.

stash✓ Tested
GitInspecting the working tree

Test whether tracked working files changed

Git: A quiet diff returns status one for differences, so handle it in a conditional.

Git✓ Tested
GitGetting Started

Unstage a file while keeping its contents

Git: Unstage a file while keeping its contents inside the disposable repository created by the input setup.

Git✓ Tested