1 Using the file advanced.1.conf, we might obtain the following results:
4 % mount `pwd`/advanced.1.conf /p
5 % cat /p/tcp/localhost/daytime
6 Tue Jul 6 01:09:15 1999
8 % cat /p/fs//etc/rc # Note the double /, as fs/ is stripped.
11 % cat /p/fs/etc/rc # Since the daemon does a chdir to /, we
12 # don't really need to specify the extra slash.
15 % cat /p/echo/echo/this/message
18 % cat /p/echo/"This has spaces in it, but is protected by quotes"
19 This has spaces in it, but is protected by quotes
21 % cat /p/echo_nostrip/thisthat
24 % cat /p/echo_noslashNoticeNoSlashHere
28 1896381655 10514 /etc/rc
30 % cat /etc/rc | gzip > /tmp/rc.gz
32 % cksum /tmp/rc /p/gzcat//tmp/rc.gz
33 1896381655 10514 /tmp/rc
34 1896381655 10514 /p/gzcat//tmp/rc.gz
36 % cat /etc/rc > /p/gzip//tmp/rc.gz.2
39 -rw-r--r-- 1 root wheel 3751 Jul 6 01:25 /tmp/rc.gz
40 -rw-r--r-- 1 root wheel 3751 Jul 6 01:26 /tmp/rc.gz.2
42 % cat /etc/rc > /p/gzip9//tmp/rc.gz9
45 -rw-r--r-- 1 root wheel 3748 Jul 6 01:27 /tmp/rc.gz9
47 % cat /p/gzcat//tmp/rc.gz9 | cksum
50 % cat /p/ftp/ftp.NetBSD.org:pub/NetBSD/README
53 % cat /p/http://www.NetBSD.org/index.html
56 # And now for some more creative uses...
58 # Both formats of FTP commands work:
59 % cp /p/ftp/ftp.NetBSD.org:pub/NetBSD/NetBSD-current/tar_files/src/bin.tar.gz .
61 % cp /p/ftp://ftp.NetBSD.org/pub/NetBSD/NetBSD-current/tar_files/src/sbin.tar.gz .
65 # Or, we can be fancier. Tar tries to convert /p/ftp/a:b into a
66 # request for file b from host /p/ftp/a, so we need to
67 # circumvent that by using cat.
68 % cat /p/gzcat//p/ftp/ftp.NetBSD.org:pub/NetBSD/NetBSD-current/tar_files/src/sbin.tar.gz | tar xf -
70 # Or, we can bzip all of our man pages and still access them
71 # without changing the man program:
72 % cd /usr/share/man/man8
74 % cat mount_portal.8 | bzip2 -9 > mount_portal.8.bz2
78 % ln -s /p/bzcat//usr/share/man/man8/mount_portal.8.bz2 mount_portal.8
83 % cat /p/nroff//p/bzcat//usr/share/man/man8/mount_portal.bz2
86 # Or, rather than putting //, we can use the last nroff
87 # configuration, nroff%, instead:
88 % cat /p/nroff%/p/bzcat%/usr/share/man/man8/mount_portal.bz2
90 # Also, we can provide read-only 'sysctlfs' functionality. This
91 # is provided by the shell script sysctlfs.sh, which should be in
92 # /usr/share/examples/mount_portal.
94 % cat /p/sysctl/kern.mbuf
101 % cat /p/sysctl/kern/mbuf
108 % cat /p/sysctl/kern/mbuf/msize