- The first example shows that listing all sources files under /zx/sys/src can be done with this command
; lz /zx/sys/src/, /zx/sys/src /zx/sys/src/clive /zx/sys/src/clo
Or we can list only directories using
; lz /zx/sys/src/,type=d
Or we can remove all regular files in a hierarchy by using
; rm /zx/sys/src/,type=-
Predicates used to find files are general expressions that may use directory attributes as values, which makes it easy for a command to issue an expression to find the entries of interest in a single or a few RPCs. Directory entries are self-describing entities (eg., they report also the address of the server and the name of the resource in the server).
This makes it easy for a program to issue requests for a directory entry it found. In short, file trees in clive are split into two important entities: Finders used to find directory entries, and file trees that accept operations for directory entries
- Each process groups one or more finders into a name space, built from a textual representation (it might
inherit the name space from the parent). For example, we can use
- ; NS=’/ /
;; /zx tcp!zxserver!zx
;; /dump tcp!zxserver!zx!dump
; lz /zx/usr/nemo,type=d
- to define a new name space and then issue commands that work in it. In this example, we defined as / the root of the host OS file tree, and then mounted at /zx our main tree and at /dump its dump file system. To say it in a different way, the name space is a finder that may groups other finders (among other things). The name space is more powerful, and can mount at a given name a set of directory entries (be they for files or not), but the example suffices for now.