Skip to content

Pynosaur/path

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

path

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.

Install

pget install path

Usage

path [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

Examples

List everything in the current directory:

path

Find only files:

path . -f

Find only directories:

path . -d

Find Python files by glob pattern:

path . -f -p '*.py'

Find Python files by extension:

path . -f -e py

Limit search to 2 layers deep:

path . -l 2

Find directories named "bin" under /usr:

path /usr -d -n bin

Find files larger than 1MB:

path . -f -s +1M

Find files modified in the last 7 days:

path . -f -m 7

Tree view at 3 layers:

path . --tree -l 3

List files with sizes:

path . -f -L

Count files and directories:

path . --count

Size Suffixes

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 < 1MB

Build

bazel build //:path_bin

License

MIT

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors