Skip to content
/ walk Public

A simplified find command that recursively walks a directory and finds files that match the given patterns.

License

Notifications You must be signed in to change notification settings

sspencer/walk

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Walk

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.

Install

  1. checkout the code
  2. cd walk
  3. go install

If go/bin is in your PATH, simply type walk.

Command line help:

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

Examples

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

About

A simplified find command that recursively walks a directory and finds files that match the given patterns.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages