set i -1 while {[incr i]<512} {puts "0[set p [format %03o $i]] is -[string map {0 --- 1 --x 2 -w- 3 -wx 4 r-- 5 r-x 6 rw- 7 rwx} $p]"}