A simplified find
command that recursively walks a directory and finds files that match the given patterns. All files that begin with "." are ignored. Walk is written in Go, is (currently) under 100 lines and code and should easily compile on all platforms that support Go.
- checkout the code
- cd walk
- go install
If go/bin is in your PATH, simply type walk
.
The walk utility recursively descends the directory tree for the specified directory
and prints files that match the specified substring patterns.
Usage:
walk <directory> [pat1 pat2 ...]
Flags:
-s directory
skip this directory (comma separated to multiple flags)
-x treat patterns as file extensions
Find all web related files in the current directory:
walk -x . js css html
Find all files that contain 2017 in the filename:
walk . 2017
Find all files in another directory
walk ~/Sites/img
Find all local Go files, skipping the vendor and doc directories
walk -x -s vendor -s doc . go