1Using the file advanced.1.conf, we might obtain the following results: 2 3% mkdir /p 4% mount `pwd`/advanced.1.conf /p 5% cat /p/tcp/localhost/daytime 6Tue Jul 6 01:09:15 1999 7 8% cat /p/fs//etc/rc # Note the double /, as fs/ is stripped. 9<contents of /etc/rc> 10 11% cat /p/fs/etc/rc # Since the daemon does a chdir to /, we 12 # don't really need to specify the extra slash. 13<contents of /etc/rc> 14 15% cat /p/echo/echo/this/message 16echo/this/message 17 18% cat /p/echo/"This has spaces in it, but is protected by quotes" 19This has spaces in it, but is protected by quotes 20 21% cat /p/echo_nostrip/thisthat 22echo_nostrip/thisthat 23 24% cat /p/echo_noslashNoticeNoSlashHere 25NoticeNoSlashHere 26 27% cksum /etc/rc 281896381655 10514 /etc/rc 29 30% cat /etc/rc | gzip > /tmp/rc.gz 31 32% cksum /tmp/rc /p/gzcat//tmp/rc.gz 331896381655 10514 /tmp/rc 341896381655 10514 /p/gzcat//tmp/rc.gz 35 36% cat /etc/rc > /p/gzip//tmp/rc.gz.2 37 38% ls -l /tmp/rc.gz* 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 41 42% cat /etc/rc > /p/gzip9//tmp/rc.gz9 43 44% ls -l /tmp/rc.gz9 45-rw-r--r-- 1 root wheel 3748 Jul 6 01:27 /tmp/rc.gz9 46 47% cat /p/gzcat//tmp/rc.gz9 | cksum 481896381655 10514 49 50% cat /p/ftp/ftp.NetBSD.org:pub/NetBSD/README 51 <contents deleted> 52 53% cat /p/http://www.NetBSD.org/index.html 54 <contents deleted> 55 56# And now for some more creative uses... 57% cd /tmp 58# Both formats of FTP commands work: 59% cp /p/ftp/ftp.NetBSD.org:pub/NetBSD/NetBSD-current/tar_files/src/bin.tar.gz . 60 61% cp /p/ftp://ftp.NetBSD.org/pub/NetBSD/NetBSD-current/tar_files/src/sbin.tar.gz . 62 63% tar xzf sbin.tar.gz 64 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 - 69 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 73 74% cat mount_portal.8 | bzip2 -9 > mount_portal.8.bz2 75 76% rm mount_portal.8 77 78% ln -s /p/bzcat//usr/share/man/man8/mount_portal.8.bz2 mount_portal.8 79 80% man mount_portal 81 <it works!> 82 83% cat /p/nroff//p/bzcat//usr/share/man/man8/mount_portal.bz2 84 <also works.> 85 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 89 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. 93 94% cat /p/sysctl/kern.mbuf 95msize = 128 96mclbytes = 2048 97nmbclusters = 512 98mblowat = 16 99mcllowat = 8 100 101% cat /p/sysctl/kern/mbuf 102msize = 128 103mclbytes = 2048 104nmbclusters = 512 105mblowat = 16 106mcllowat = 8 107 108% cat /p/sysctl/kern/mbuf/msize 109128 110 111