Results for “file count”
Small, practical examples. Search by task or narrow things down below.
Inspect a file length without reading it
C#: Use FileInfo.Length to retrieve a logical size in bytes.
C#✓ Tested
Inspect a path’s filename and extension
Inspect a path’s filename and extension in a complete Rust program using the standard library.
Rust✓ Tested
Inspect which files a stash changes
Git: stash show can report just filenames before applying anything.
Git✓ Tested
Join lines from two files side by side
Linux Commands: Use paste to pair lines by position with a chosen separator.
Linux Commands✓ Tested
Join two sorted files by a shared key
Linux Commands: Use join for sorted, simple delimiter-separated records with one row per key.
Linux Commands✓ Tested
Keep a counter from wrapping at its maximum
Arduino / C: Increment only when the value is below its limit.
Arduino / C✓ Tested
List all files stored in a commit
Git: ls-tree inspects the committed tree without relying on working files.
Git✓ Tested
List changed files without the full diff
Inspect affected paths before staging.
diff✓ Tested
List files by extension
Enumerate regular files and return their names in order.
Get-ChildItem✓ Tested
List files changed by the current commit
Git: diff-tree exposes the paths changed between a commit and its parent.
Git✓ Tested
List files containing a match
Linux Commands: Use grep -l when only the matching filenames are needed.
Linux Commands✓ Tested
List files in a folder
List the names of regular files in a folder in alphabetical order, excluding subdirectories.
directory✓ Tested