walk.1 (2156B)
1 .\" Copied from 9front.org. Legal information (as far as I can tell, 2 .\" from looking at /lib/legal/NOTICE): 3 .\" 4 .\" Copyright 20XX 9front authors 5 .\" Licensed under the MIT license 6 .\" 7 .TH WALK 1 8 .SH NAME 9 walk \- walk a path 10 .SH SYNOPSIS 11 .B walk 12 [ 13 .B -dftxu 14 ] [ 15 .B -n 16 .I mind,maxd 17 ] [ 18 .B -e 19 .I statfmt 20 ] [ 21 .I name ... 22 ] 23 .SH DESCRIPTION 24 .I Walk 25 recursively descends any directory arguments, 26 printing the name of each file on a separate line. 27 When no arguments are given, the working directory 28 is assumed. 29 Non-directory arguments are checked for existence, 30 then printed, if so. 31 .PP 32 Options are: 33 .TP 34 .B -d 35 Print only directories. 36 .TP 37 .B -f 38 Print only non-directories. 39 .TP 40 .B -t 41 Print a file only if it has the temporary flag set. 42 .TP 43 .B -x 44 Print a file only if it has any executable bits set. 45 .TP 46 .B -u 47 Unbuffered output. 48 .TP 49 .B -n min,max 50 Set the inclusive range of depths for filtering in results. 51 Both 52 .I min 53 and 54 .I max 55 are optional. 56 An argument of 57 .I n 58 with no comma is equivalent to 59 .IR 0,n . 60 .TP 61 .B -e statfmt 62 Specify the output format. 63 Each character in 64 .I statfmt 65 specifies a file attribute to display. 66 The printed attributes are separated by spaces. 67 .RS \n(INu 68 .PP 69 The statfmt characters are as follows: 70 .TF . 71 .TP 72 .B U 73 owner name (uid) 74 .TP 75 .B G 76 group name (gid) 77 .TP 78 .B M 79 name of last user to modify (muid) 80 .TP 81 .B a 82 last access time (atime) 83 .TP 84 .B m 85 last modification time (mtime) 86 .TP 87 .B n 88 final path element (name) 89 .TP 90 .B p 91 path 92 .TP 93 .B q 94 qid path.version.type (see 95 .IR stat (2)) 96 .TP 97 .B s 98 size in bytes 99 .TP 100 .B x 101 permissions 102 .TP 103 .B D 104 server device 105 .TP 106 .B T 107 server type (kernel device rune) 108 .PD 109 .PP 110 The default statfmt is simply, 111 .IR p . 112 .SH EXAMPLES 113 List files in a directory, sorted by modification time. 114 .IP 115 .EX 116 walk -femp catpics | sort -n | sed 's/^[^ ]+ //' 117 .EE 118 .PP 119 Print the size and path of files (excluding dirs) 120 in the working directory. 121 .IP 122 .EX 123 walk -fn1 -esp 124 .EE 125 .PD 126 .SH SOURCE 127 .B /sys/src/cmd/walk.c 128 .SH SEE ALSO 129 .IR ls (1), 130 .IR du (1) 131 .SH BUGS 132 Manipulating ifs is a nuisance. 133 .PP 134 File names are assumed to not contain newlines. 135 .PP 136 Correct invocation requires too much thought. 137 .SH HISTORY 138 .I Walk 139 first appeared in 9front (March, 2019).