Manual Page Search Parameters

WALK(1) General Commands Manual WALK(1)

walk - walk a path

walk [ -dftxu ] [ -n mind,maxd ] [ -e statfmt ] [ name ... ]

Walk recursively descends any directory arguments, printing the name of each file on a separate line. When no arguments are given, the working directory is assumed. Non-directory arguments are checked for existence, then printed, if so.

Options are:

Print only directories.
Print only non-directories.
Print a file only if it has the temporary flag set.
Print a file only if it has any executable bits set.
Unbuffered output.
-n min,max
Set the inclusive range of depths for filtering in results. Both min and max are optional. An argument of n with no comma is equivalent to 0,n.
Specify the output format. Each character in statfmt specifies a file attribute to display. The printed attributes are separated by spaces.

The statfmt characters are as follows:

owner name (uid)
group name (gid)
name of last user to modify (muid)
last access time (atime)
last modification time (mtime)
final path element (name)
path
qid path.version.type (see stat(2))
size in bytes
permissions
server device
server type (kernel device rune)

The default statfmt is simply, p.

List files in a directory, sorted by modification time.

walk -femp catpics | sort -n | sed 's/^[^ ]+ //'
    

Print the size and path of files (excluding dirs) in the working directory.

walk -fn1 -esp
    

/sys/src/cmd/walk.c

ls(1), du(1)

Manipulating ifs is a nuisance.

File names are assumed to not contain newlines.

Correct invocation requires too much thought.

Walk first appeared in 9front (March, 2019).

jacob