Skip to content

Repository files navigation

PSItems — fast filesystem search & content scanning for PowerShell

GitHub ActionsPS Gallery (downloads + version)LicenseIssues / PRs
GitHub Actions StatusPowerShell GalleryPS Gallery VersionLicenseOpen IssuesOpen PRs
Runtime (pwsh)PlatformsQuality & Maintenance
pwsh 7+PlatformsPSSADevSkimDependabot

Logo


A Linux-style toolkit for PowerShell that’s fast by default. It streams from .NET System.IO.Enumerate* to keep memory low and throughput high.

Features at a glance

  • Cross-platform: Windows • Linux • macOS (PowerShell 7+).
  • Commands: psfind (find files/dirs), psgrep (search content), pssize (measure sizes).
  • Linux-like UX: switches such as -Iname, -Type, -Depth, -MinDepth. -Path wildcards expand to multiple roots.
  • Fast: streaming enumeration with minimal allocations.

Installation

Install-Module-Name PSItems -Scope CurrentUser
Import-Module-Name PSItems

Aliases at a glance

AliasesUnderlying cmdletLinux/Unix analogDescription
psfind, search, ff, fiFind-ItemfindFind items (files/directories/etc.)
psgrepFind-ItemContentgrepSearch for text/regex in files
pssize, sizeGet-ItemSizeduMeasure size of files/directories

Quick start

# Find: list everything one level down as fast strings
psfind $HOME-Name '*'-Depth 1# Find: case-insensitive *.log anywhere
psfind $HOME-Type File -Iname '*.log'-Recurse
# Size: quick size of your home (one level down), in MB (default)
pssize $HOME-Depth 1# Grep: find 'TODO' in all PowerShell scripts under your home (recursive)
psgrep 'TODO'$HOME-Name '*.ps1'-Recurse

Complete docs for each cmdlet live in docs/en-US/ and via Get-Help <CmdletName> -Full.


Linux find ↔︎ Find-Item (quick map)

Full guide with more options & examples: res/guides/Linux-find-compatibility.md

Linux find featureFind-Item equivalentExample (unescape | when copying)
Wildcard roots (/var/*/log)-Path expands to multiple rootspsfind -Path '/var/*/log' -Name '*.log' -Recurse
Root //C:\ on Windowspsfind / -Name '*' -Recurse
-name PATTERN-Name (platform default casing)psfind / -Name '*.log' -Recurse
-iname PATTERN-Iname (always case-insensitive)psfind / -Iname '*.exe' -Recurse
-type f / -type d-Type File / -Type Directorypsfind / -Type File -Name '*.txt' -Recurse
-maxdepth N / -mindepth N-Depth N / -MinDepth Npsfind / -Depth 2 -Name '*.dll'
-ls-As FileSystemInfopsfind / -As FileSystemInfo -Recurse
-exec … {}Pipe to PowerShellpsfind $HOME -Type File -Iname '*.txt' -Recurse | ForEach-Object { Get-Item $_ }

Notes: Use -Iname for portable case-insensitive matching; -Path wildcards expand to multiple roots; filter size/time/perm in the pipeline.


Testing & Speed

Reproducible, copy‑pasteable benchmarks live here:

Highlights from a sample run (Windows, SSD):

  • Names only (strings): PSItems ~3.23 s vs Get-ChildItem ~17.16 s~5.3× faster
  • Typed output (objects): PSItems ~3.56 s vs Get-ChildItem ~14.19 s~4.0× faster
  • Depth-limited (Depth = 2): PSItems ~2.14 s vs Get-ChildItem ~11.96 s~5.6× faster
  • PSItems 0.7.0 vs 0.3.6 (names-only): ~3.37 s vs ~5.70 s~1.7× faster

Numbers vary by machine and dataset. The linked doc shows the exact commands you can re-run locally.


Contributing

PRs that improve performance, reliability, cross‑platform behavior, or docs are welcome.

Publishing to the PowerShell Gallery is automated via GitHub Actions; tags like v0.7.0 trigger a release.


About

Fast, cross-platform PowerShell module to find files & folders, grep file content, and measure sizes—Linux-style find/grep/du made simple.

Topics

Resources

Code of conduct

Contributing

Stars

23 stars

Watchers

2 watching

Forks

Releases

Sponsor this project

Used by

Contributors

Languages