advanced.1 revision 1.4
11.1SbgraysonUsing the file advanced.1.conf, we might obtain the following results: 21.1Sbgrayson 31.1Sbgrayson% mkdir /p 41.1Sbgrayson% mount `pwd`/advanced.1.conf /p 51.1Sbgrayson% cat /p/tcp/localhost/daytime 61.1SbgraysonTue Jul 6 01:09:15 1999 71.1Sbgrayson 81.1Sbgrayson% cat /p/fs//etc/rc # Note the double /, as fs/ is stripped. 91.1Sbgrayson<contents of /etc/rc> 101.1Sbgrayson 111.1Sbgrayson% cat /p/fs/etc/rc # Since the daemon does a chdir to /, we 121.1Sbgrayson # don't really need to specify the extra slash. 131.1Sbgrayson<contents of /etc/rc> 141.1Sbgrayson 151.1Sbgrayson% cat /p/echo/echo/this/message 161.1Sbgraysonecho/this/message 171.1Sbgrayson 181.1Sbgrayson% cat /p/echo/"This has spaces in it, but is protected by quotes" 191.1SbgraysonThis has spaces in it, but is protected by quotes 201.1Sbgrayson 211.1Sbgrayson% cat /p/echo_nostrip/thisthat 221.1Sbgraysonecho_nostrip/thisthat 231.1Sbgrayson 241.1Sbgrayson% cat /p/echo_noslashNoticeNoSlashHere 251.1SbgraysonNoticeNoSlashHere 261.1Sbgrayson 271.1Sbgrayson% cksum /etc/rc 281.1Sbgrayson1896381655 10514 /etc/rc 291.1Sbgrayson 301.1Sbgrayson% cat /etc/rc | gzip > /tmp/rc.gz 311.1Sbgrayson 321.4Sbgrayson% cksum /tmp/rc /p/gzcat//tmp/rc.gz 331.1Sbgrayson1896381655 10514 /tmp/rc 341.1Sbgrayson1896381655 10514 /p/gzcat//tmp/rc.gz 351.1Sbgrayson 361.1Sbgrayson% cat /etc/rc > /p/gzip//tmp/rc.gz.2 371.1Sbgrayson 381.1Sbgrayson% ls -l /tmp/rc.gz* 391.1Sbgrayson-rw-r--r-- 1 root wheel 3751 Jul 6 01:25 /tmp/rc.gz 401.1Sbgrayson-rw-r--r-- 1 root wheel 3751 Jul 6 01:26 /tmp/rc.gz.2 411.1Sbgrayson 421.1Sbgrayson% cat /etc/rc > /p/gzip9//tmp/rc.gz9 431.1Sbgrayson 441.1Sbgrayson% ls -l /tmp/rc.gz9 451.1Sbgrayson-rw-r--r-- 1 root wheel 3748 Jul 6 01:27 /tmp/rc.gz9 461.1Sbgrayson 471.1Sbgrayson% cat /p/gzcat//tmp/rc.gz9 | cksum 481.1Sbgrayson1896381655 10514 491.1Sbgrayson 501.1Sbgrayson% cat /p/ftp/ftp.netbsd.org:pub/NetBSD/README 511.1Sbgrayson <contents deleted> 521.1Sbgrayson 531.1Sbgrayson% cat /p/http://www.netbsd.org/index.html 541.1Sbgrayson <contents deleted> 551.1Sbgrayson 561.1Sbgrayson# And now for some more creative uses... 571.1Sbgrayson% cd /tmp 581.1Sbgrayson# Both formats of FTP commands work: 591.1Sbgrayson% cp /p/ftp/ftp.netbsd.org:pub/NetBSD/NetBSD-current/tar_files/src/bin.tar.gz . 601.1Sbgrayson 611.1Sbgrayson% cp /p/ftp://ftp.netbsd.org/pub/NetBSD/NetBSD-current/tar_files/src/sbin.tar.gz . 621.1Sbgrayson 631.1Sbgrayson% tar xzf sbin.tar.gz 641.1Sbgrayson 651.1Sbgrayson# Or, we can be fancier. Tar tries to convert /p/ftp/a:b into a 661.1Sbgrayson# request for file b from host /p/ftp/a, so we need to 671.1Sbgrayson# circumvent that by using cat. 681.1Sbgrayson% cat /p/gzcat//p/ftp/ftp.netbsd.org:pub/NetBSD/NetBSD-current/tar_files/src/sbin.tar.gz | tar xf - 691.1Sbgrayson 701.1Sbgrayson# Or, we can bzip all of our man pages and still access them 711.1Sbgrayson# without changing the man program: 721.1Sbgrayson% cd /usr/share/man/man8 731.1Sbgrayson 741.1Sbgrayson% cat mount_portal.8 | bzip2 -9 > mount_portal.8.bz2 751.1Sbgrayson 761.1Sbgrayson% rm mount_portal.8 771.1Sbgrayson 781.1Sbgrayson% ln -s /p/bzcat//usr/share/man/man8/mount_portal.8.bz2 mount_portal.8 791.1Sbgrayson 801.1Sbgrayson% man mount_portal 811.1Sbgrayson <it works!> 821.1Sbgrayson 831.1Sbgrayson% cat /p/nroff//p/bzcat//usr/share/man/man8/mount_portal.bz2 841.1Sbgrayson <also works.> 851.1Sbgrayson 861.1Sbgrayson# Or, rather than putting //, we can use the last nroff 871.1Sbgrayson# configuration, nroff%, instead: 881.1Sbgrayson% cat /p/nroff%/p/bzcat%/usr/share/man/man8/mount_portal.bz2 891.2Sbgrayson 901.2Sbgrayson# Also, we can provide read-only 'sysctlfs' functionality. This 911.2Sbgrayson# is provided by the shell script sysctlfs.sh, which should be in 921.2Sbgrayson# /usr/share/examples/mount_portal. 931.2Sbgrayson 941.2Sbgrayson% cat /p/sysctl/kern.mbuf 951.2Sbgraysonmsize = 128 961.2Sbgraysonmclbytes = 2048 971.2Sbgraysonnmbclusters = 512 981.2Sbgraysonmblowat = 16 991.2Sbgraysonmcllowat = 8 1001.2Sbgrayson 1011.2Sbgrayson% cat /p/sysctl/kern/mbuf 1021.2Sbgraysonmsize = 128 1031.2Sbgraysonmclbytes = 2048 1041.2Sbgraysonnmbclusters = 512 1051.2Sbgraysonmblowat = 16 1061.2Sbgraysonmcllowat = 8 1071.2Sbgrayson 1081.2Sbgrayson% cat /p/sysctl/kern/mbuf/msize 1091.2Sbgrayson128 1101.2Sbgrayson 111