https://github.com/thimc/walk
plan 9 inspired alternative to find(1)
https://github.com/thimc/walk
cli find golang plan9 walk
Last synced: 11 months ago
JSON representation
plan 9 inspired alternative to find(1)
- Host: GitHub
- URL: https://github.com/thimc/walk
- Owner: thimc
- License: mit
- Created: 2024-01-27T16:49:46.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2025-06-18T18:34:46.000Z (about 1 year ago)
- Last Synced: 2025-06-18T19:42:14.565Z (about 1 year ago)
- Topics: cli, find, golang, plan9, walk
- Language: Go
- Homepage:
- Size: 23.4 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# walk
Walk is a lightweight alternative to the find(1) command, it's main
purpose is to walk directories recursively and print the name of
each line on a separate line. It is very much inspired by the 9front
command walk(1).
Usage: walk [ -dfx ] [ -n min,max ] [ -e "fmt" ] [ name ... ] [ ! cmd ]
! Run cmd in a sub shell with sh(1) for each match.
If an unescaped % occurs in the command list it will
be replaced with the file name.
-d Print only directories.
-e string
Specifies the output format.
The attributes are automatically separated with a space.
The following characters are accepted:
U Owner name
G Group name
M name of the last user to modify the file
a last access time
m last modification time
n final path element (name)
p path
s size (bytes)
x permissions (default "p")
-f Print only non-directories.
-n string
Sets the inclusive range for depth filtering.
The expected format is "min,max" and both are optional.
An argument of n with no comma is equivalent to 0,n.
-x Print only if the executable bit is set.
## Installation
go build
## Examples
This example is straight from 9fronts man page and is adjusted to
work with this version of walk. It will walk the `~/bin/` directory,
list its files sorted by the modification date:
walk -f -e mp ~/bin | sort -n | sed -E 's/^[^ ]+ //'
Here is another example where walk will only print files or directories
that are deeper than 2 levels or more:
walk -n 2, ~/bin
# License
MIT