A pure Python file and directory finder powered by pathlib. Part of the Pynosaur ecosystem.
More sophisticated than find, with layers (depth control), pattern matching, size filtering, and tree view — all in a clean, intuitive interface.
pget install pathpath [ROOT] [OPTIONS]
| Flag | Description |
|---|---|
-f, --files |
Find files only |
-d, --dirs |
Find directories only |
-p, --pattern PAT |
Glob pattern (*.py, test_*) |
-e, --ext EXT |
Filter by extension (py, txt) |
-n, --name NAME |
Name contains string |
-l, --layers N |
Max depth (0 = root only) |
-s, --size SIZE |
Filter by size (+1M, -100K) |
-m, --modified DAYS |
Modified within N days |
--hidden |
Include hidden files/dirs |
--count |
Show count only |
--abs |
Show absolute paths |
--tree |
Tree view output |
-L, --long |
Show file sizes |
List everything in the current directory:
pathFind only files:
path . -fFind only directories:
path . -dFind Python files by glob pattern:
path . -f -p '*.py'Find Python files by extension:
path . -f -e pyLimit search to 2 layers deep:
path . -l 2Find directories named "bin" under /usr:
path /usr -d -n binFind files larger than 1MB:
path . -f -s +1MFind files modified in the last 7 days:
path . -f -m 7Tree view at 3 layers:
path . --tree -l 3List files with sizes:
path . -f -LCount files and directories:
path . --count| Suffix | Meaning |
|---|---|
B |
Bytes |
K |
Kilobytes (1024) |
M |
Megabytes (1024²) |
G |
Gigabytes (1024³) |
Prefix with + for "larger than", - for "smaller than":
path . -f -s +500K # files > 500KB
path . -f -s -1M # files < 1MBbazel build //:path_binMIT