1$NetBSD: advanced.1,v 1.6 2017/05/09 23:26:49 kamil Exp $ 2 3Using the file advanced.1.conf, we might obtain the following results: 4 5% mkdir /p 6% mount `pwd`/advanced.1.conf /p 7% cat /p/tcp/localhost/daytime 8Tue Jul 6 01:09:15 1999 9 10% cat /p/fs//etc/rc # Note the double /, as fs/ is stripped. 11<contents of /etc/rc> 12 13% cat /p/fs/etc/rc # Since the daemon does a chdir to /, we 14 # don't really need to specify the extra slash. 15<contents of /etc/rc> 16 17% cat /p/echo/echo/this/message 18echo/this/message 19 20% cat /p/echo/"This has spaces in it, but is protected by quotes" 21This has spaces in it, but is protected by quotes 22 23% cat /p/echo_nostrip/thisthat 24echo_nostrip/thisthat 25 26% cat /p/echo_noslashNoticeNoSlashHere 27NoticeNoSlashHere 28 29% cksum /etc/rc 301896381655 10514 /etc/rc 31 32% cat /etc/rc | gzip > /tmp/rc.gz 33 34% cksum /tmp/rc /p/gzcat//tmp/rc.gz 351896381655 10514 /tmp/rc 361896381655 10514 /p/gzcat//tmp/rc.gz 37 38% cat /etc/rc > /p/gzip//tmp/rc.gz.2 39 40% ls -l /tmp/rc.gz* 41-rw-r--r-- 1 root wheel 3751 Jul 6 01:25 /tmp/rc.gz 42-rw-r--r-- 1 root wheel 3751 Jul 6 01:26 /tmp/rc.gz.2 43 44% cat /etc/rc > /p/gzip9//tmp/rc.gz9 45 46% ls -l /tmp/rc.gz9 47-rw-r--r-- 1 root wheel 3748 Jul 6 01:27 /tmp/rc.gz9 48 49% cat /p/gzcat//tmp/rc.gz9 | cksum 501896381655 10514 51 52% cat /p/ftp/ftp.NetBSD.org:pub/NetBSD/README 53 <contents deleted> 54 55% cat /p/http://www.NetBSD.org/index.html 56 <contents deleted> 57 58# And now for some more creative uses... 59% cd /tmp 60# Both formats of FTP commands work: 61% cp /p/ftp/ftp.NetBSD.org:pub/NetBSD/NetBSD-current/tar_files/src/bin.tar.gz . 62 63% cp /p/ftp://ftp.NetBSD.org/pub/NetBSD/NetBSD-current/tar_files/src/sbin.tar.gz . 64 65% tar xzf sbin.tar.gz 66 67# Or, we can be fancier. Tar tries to convert /p/ftp/a:b into a 68# request for file b from host /p/ftp/a, so we need to 69# circumvent that by using cat. 70% cat /p/gzcat//p/ftp/ftp.NetBSD.org:pub/NetBSD/NetBSD-current/tar_files/src/sbin.tar.gz | tar xf - 71 72# Or, we can bzip all of our man pages and still access them 73# without changing the man program: 74% cd /usr/share/man/man8 75 76% cat mount_portal.8 | bzip2 -9 > mount_portal.8.bz2 77 78% rm mount_portal.8 79 80% ln -s /p/bzcat//usr/share/man/man8/mount_portal.8.bz2 mount_portal.8 81 82% man mount_portal 83 <it works!> 84 85% cat /p/nroff//p/bzcat//usr/share/man/man8/mount_portal.bz2 86 <also works.> 87 88# Or, rather than putting //, we can use the last nroff 89# configuration, nroff%, instead: 90% cat /p/nroff%/p/bzcat%/usr/share/man/man8/mount_portal.bz2 91 92# Also, we can provide read-only 'sysctlfs' functionality. This 93# is provided by the shell script sysctlfs.sh, which should be in 94# /usr/share/examples/mount_portal. 95 96% cat /p/sysctl/kern.mbuf 97msize = 128 98mclbytes = 2048 99nmbclusters = 512 100mblowat = 16 101mcllowat = 8 102 103% cat /p/sysctl/kern/mbuf 104msize = 128 105mclbytes = 2048 106nmbclusters = 512 107mblowat = 16 108mcllowat = 8 109 110% cat /p/sysctl/kern/mbuf/msize 111128 112