Search recursively for text in files
Build a paste-ready command, then review its compatibility and effects before running it.
Get-ChildItem <folder> -File -Recurse | Select-String -Pattern <pattern>Complete required fields to copy the generated command.
read-onlyno known side effects Compatibility
WindowsVerified for Windows using powershell syntax.
Operational knowledgereview due 2027-01-19
RequirementsGet-ChildItemGet-ChildItem must be installed and available on PATH.
Version supportGet-ChildItem Current supported releasesVerified for windows using powershell syntax; consult compatibility notes for platform-specific differences.
Expected signalsC:\Logs\web\error.log:1842:2026-07-23T08:38:11Z upstream timeout after 30sRepresentative successful output; values vary with the selected target and system state.
Known errorsGet-ChildItem: command not foundGet-ChildItem is missing or is not available on PATH.
VerifyGet-ChildItem {{folder}} -File -Recurse | Select-String -Pattern {{pattern}}The output matches the expected target and exits without an error.Rollback noteNot required: this command is read-only and does not change system state.
Command breakdown
01Get-ChildItemCommandRuns the Get-ChildItem stage of this one-liner.
02<folder>ParameterA value supplied in the Fill parameters section.
03-FileOptionConfigures Get-ChildItem with the -File option.
04-RecurseOptionConfigures Get-ChildItem with the -Recurse option.
05|PipelinePasses the output on the left to the command on the right.
06Select-StringCommandRuns the Select-String stage of this one-liner.
07-PatternOptionConfigures Select-String with the -Pattern option.
08<pattern>ParameterA value supplied in the Fill parameters section.
Example input
Get-ChildItem C:\Logs -File -Recurse | Select-String -Pattern 'timeout'
Example output
C:\Logs\web\error.log:1842:2026-07-23T08:38:11Z upstream timeout after 30s
C:\Logs\worker.log:422:job 91f2c timed out while waiting for storage
Illustrative output — exact values vary by system and data.
Official sources