FIND YOUR NEXT FEW LINES

Results for “directory”

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

667 snippets foundClear filters
SQLiteGetting Started

Keep rows matching a condition

SQLite: Use WHERE to select rows with a particular category.

SQLite✓ Tested
Linux CommandsGetting Started

Keep spaces inside one argument

Linux Commands: Keep spaces inside one argument using GNU/Linux commands in an empty practice directory.

Linux Commands✓ Tested
Bash ScriptsGetting Started

Limit a beginner function variable to local scope

Bash Scripts: Limit a beginner function variable to local scope with a small standalone Bash program.

Bash Scripts✓ Tested
GoTesting & reusable helpers

Limit the bytes read from a stream

Limit the bytes read from a stream using a complete Go program with explicit sample inputs.

Go✓ Tested
PowerShellFiles & paths

List files by extension

Enumerate regular files and return their names in order.

Get-ChildItem✓ Tested
Linux CommandsSearching text

List files containing a match

Linux Commands: Use grep -l when only the matching filenames are needed.

Linux Commands✓ Tested
GitInspecting the working tree

List files tracked by Git

Git: ls-files reads the index instead of listing every file in the working directory.

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
SQLiteRelationships & missing data

List unordered pairs without duplicate reversals

SQLite: Join using an increasing key comparison to omit self-pairs and reversed duplicates.

SQLite✓ Tested
Bash ScriptsFunction scope & composition

Load functions from a trusted local script

Bash Scripts: Source executes a file in the current shell so its function definitions remain available.

Bash Scripts✓ Tested
GoGetting Started

Look up a map entry

Look up a map entry using a complete Go program with explicit sample inputs.

Go✓ Tested