FIND YOUR NEXT FEW LINES

Results for “file”

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

838 snippets foundClear filters
GitInspecting the working tree

List only staged filenames

Git: The cached diff compares the index with HEAD rather than comparing working files with the index.

Git✓ Tested
JavaFiles & paths

List regular files

List immediate regular files in sorted order and close the Java directory stream.

Java✓ Tested
C++Filesystem operations

List regular files recursively in sorted order

C++: Collect relative paths before sorting because directory iteration order is unspecified.

C++✓ Tested
GitGetting Started

List tracked file paths

Git: List tracked file paths inside the disposable repository created by the input setup.

Git✓ Tested
GitInspecting the working tree

List untracked files while honoring ignore rules

Git: Use others and exclude-standard together to respect repository and global ignore configuration.

Git✓ Tested
Docker / ComposeExecution & file transfer

Load environment variables from a file

Docker / Compose: An env file supplies one KEY=value assignment per line.

Docker / Compose✓ Tested
Docker / ComposeCompose service options

Load service variables from an env file

Docker / Compose: env_file supplies runtime environment values.

Docker / Compose✓ Tested
Docker / ComposeGetting Started

Make a Compose service’s filesystem read-only

Docker / Compose: Make a Compose service’s filesystem read-only in a small Compose file.

Docker / Compose✓ Tested
Linux CommandsGetting Started

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
Linux CommandsSearching text

Match any pattern from a file

Linux Commands: Use grep -F -f with one literal pattern per line.

Linux Commands✓ Tested
Linux CommandsFinding & selecting files

Match filenames without case sensitivity

Linux Commands: Use iname for a case-insensitive filename pattern.

Linux Commands✓ Tested
CFile positioning & lifecycle

Measure a small seekable binary file

C: Seek to the end and inspect ftell, checking both operations for errors.

C✓ Tested