#!/bin/csh vi ~jhs/bin/.csh/syntax exit ------------------------------------------------------------------------------- All utilities are named in upper case on left margin. ------------------------------------------------------------------------------- Master View CPU Switch CS-102/CS-122 AltCtrlShift,2,Enter or 1 for screen 1, or 0 to scan ------------------------------------------------------------------------------- Boot magic hw.pci.allow_unsupported_io_range=1 ------------------------------------------------------------------------------- www/apache13 /usr/local/sbin/apachectl start ------------------------------------------------------------------------------- mime to adjust handlers: /usr/local/etc/nmh/mhn.defaults ------------------------------------------------------------------------------- mfsroot floppy edit (from post): vnconfig vn0 mfsroot.flp mount /dev/vn0a /mnt cp /mnt/mfsroot.gz /tmp umount /mnt gunzip /tmp/mfsroot.gz vnconfig vn0 mfsroot mount vn0a /mnt FreeBSD-5 mdconfig -a -f 4.10-RELEASE-i386-disc1.iso mount -t cd9660 -r /dev/md0 /mnt mdconfig -d -u 0 ------------------------------------------------------------------------------- Mount a cd image: vnconfig vn0 /pub/freebsd/ref/4.7-RELEASE/cd/ISO-IMAGES-i386/vsl/1/*1.iso mount -t cd9660 -r /dev/vn0c /mnt umount /mnt vnconfig -u vn0 ------------------------------------------------------------------------------- Mount an SD ram chip on Cruzer USB under 5.1 If inserting cruzer after boot: ls /dev/da0* # just da0 mount -t msdos /dev/da0 /sandisk # complains Invalid argument ls /dev/da0* # da0 da0s1 Or later just: mount -t msdos /dev/da0s1 /sandisk USB1: 12 mbit/s usb2 480 mbit/s ------------------------------------------------------------------------------- majordomo Post-Install Notes Before you can use Majordomo, you will need to complete a few steps manually: - customize 'majordomo.cf' in your majordomo directory - look at 'aliases.majordomo' in your majordomo directory for examples of how to create lists. A test list (test-l) has been created and configured for you. Be sure to remove this list if you do not want to use it for testing. - substitute your own email address for "Postmaster" for the "majordomo-owner" alias. - add 'aliases.majordomo' to your sendmail configuration. This can be done by adding a line similar to the following to /etc/sendmail.cf : OA/usr/local/majordomo/aliases.majordomo (for 8.6.x Sendmail) OAliasFile=/etc/aliases,/usr/local/majordomo/aliases.majordomo (for 8.7.x and up) or a line similar to the following to your m4 macros file : define(`ALIAS_FILE',/etc/aliases,/usr/local/majordomo/aliases.majordomo') - subscribe zz-test "My real name" auth password subscribe zz-test "My real name" for normal people approve password subscribe list address for list owner, (doesnt need an auth from normal human) who list disabled for normal users approve password who list gets list of subscribers To edit all lists of subscribers: cd /usr/local/majordomo/lists vi `ls -1 | grep -v intro | grep -v info | grep -v digest | grep -v passwd | grep -v config | grep -v archive` chmod g-w /usr/local/majordomo/lists ------------------------------------------------------------------------------- xs cd /usr/ports; setenv DUDS "whatever ports break" make BERKLIX_CLIENT=yes BATCH=YES package # TRYBROKEN=YES - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - makefile # ~jhs/public_html/syntax/Makefile by Julian Stacey all: ${.CURDIR}/index.html # not using default html_links BLA!= find . -type f -print \( ! -name index.html -and ! -name index.html.tmp\) ${.CURDIR}/index.html: ${BLA} echo "" > $@ echo "Julian Stacey's ~/syntax/" >> $@ echo "

Julian Stacey's" >> $@ echo "
Index of ~jhs/syntax/

" >> $@ echo "

Generated `date` by " >> $@ echo "Makefile

" >> $@ echo "

" >> $@ @# Cant use ${BLA} in next line as need filenames one per line. (cd ${.CURDIR}; find . -type f \( \ ! -name index.html -and \ ! -name index.html.tmp \) \ -print ) | grep -v .ignore | sort > $@.tmp for i in `cat $@.tmp` ; do \ echo "
  • $$i
    "		>> $@ ; \
    		head -2 ${.CURDIR}/$$i				>> $@ ; \
    		echo "
    " >> $@ ; \ done @rm $@.tmp @# The head above should be changed to cat till blank line echo "

  • " >> $@ chmod 644 $@ .include make world -DWANT_AOUT=YES make NOSECURE=yes world # for 5.0-DP2 else breaks on lib/libpam/modules/pam_ssh FreeBSD 7.0 has a very slow gcc on this: gcc: /usr/src/gnu/usr.bin/cc/Makefile cc_int thrashes: cc ... insn-attrtab.c ------------------------------------------------------------------------------- cd /usr/ports ; make search key=mp3 uses ports/INDEX* ------------------------------------------------------------------------------- To derive names of tracks, one can use /usr/ports/audio/ripit which interogates a CDDB database on the net ------------------------------------------------------------------------------- Anagrams: ports/games/wordplay ports/games/an ------------------------------------------------------------------------------- Applixware /opt/applix/applix /opt/applix/builder =============================================================================== acidrip Works happily from a .iso image on hard disc (that if mounted (not necessary, just to observe for interest), contains sub dirs AUDIO_TS/ VIDEO_TS/ ). Does not need rar to be installed ------------------------------------------------------------------------------- adb adb /gt/lft/etc/lfta [core] $c backtrace $r regs ^D ------------------------------------------------------------------------------- atacontrol WDMA2 provides a maximum of 16MiB/s UDMA2 provides a maximum of 33MiB/s ------------------------------------------------------------------------------- awk awk '{printf "rm -f %s ; ln -s ..%s %s\n",$1,$3,$1}' < /tmp/x awk -F = '{printf "%s\n",$1}' < /tmp/t awk --field-separator # '{printf "%s\n",$1}' awk -F # '{printf "%s\n",$1}' # 5.0 has no --field-separator awk '{printf "%s\n",$1}' < distfiles.dump find /etc /var /usr -type l | sort | xargs ls -l | \ awk '{printf "%s -> %s\n",$9,$11}' # List all links ------------------------------------------------------------------------------- bad144 See Also mail/pending/45 mail/pending/53 tech/PALLADIUM bad144 -a -c -v wd0 1290729 1291132 1291133 1291495 1291535 1291938 1292341 # sector numbers above, as shown by /sbin/badsect BAD 881991 881629 -------------- To post: Time was when you could relate a unix bad block number to a file name so's you'd know which files were damaged, or to avoid even reading (while salvaging other data) fsck doesn't offer it, icheck & ncheck are not with us, any suggestions ? ------------------------------------------------------------------------------- # bad144.sh from s375 by Julian Stacey bad144 /dev/rwd0a bad144 /dev/rwd0b bad144 /dev/rwd0h bad144 -s /dev/rwd0a bad144 -s /dev/rwd0b bad144 -s /dev/rwd0h ------------------------------------------------------------------------------- dump 0 -f - /dev/wd0a | (cd /alt.root ; restore rvf - ) Tested on symmetric BSD-4.2: ------------------------------------------------------------------------------- flash thierry@@freebsd.org 2008.01: port www/xpi-unplug let you detach a .flv to watch it with vlc, mplayer, etc. it's possible to use the port multimedia/miro (I have even added StudyBSD as a Miro channel); there exists other solutions like graphics/gnash, and so on... ------------------------------------------------------------------------------- fsck -b 32 SCSI "REASsign Block" command ("reasb") to use any available spare sectors to replace the bad one. /usr/ports/sysutils/sformat /usr/ports/sysutils/smartmontools ------------------------------------------------------------------------------- did an install of 2.2.6, specifying B block check, tried to boot, failed, switched to LBS worked dmesg wdc0: unit 0 (wd0): wd0: 955MB (1957536 sectors), 1942 cyls, 16 heads, 63 S/T, 512 B/S fdisk wd0 ******* Working on device /dev/rwd0 ******* parameters extracted from in-core disklabel are: cylinders=143 heads=217 sectors/track=63 (13671 blks/cyl) parameters to be used for BIOS calculations are: cylinders=143 heads=217 sectors/track=63 (13671 blks/cyl) Media sector size is 512 Warning: BIOS sector numbering starts with sector 1 Information from DOS bootblock is: The data for partition 1 is: sysid 165,(FreeBSD/NetBSD/386BSD) start 63, size 1954890 (954 Meg), flag 80 beg: cyl 0/ sector 1/ head 1; end: cyl 142/ sector 63/ head 216 The data for partition 2 is: The data for partition 3 is: The data for partition 4 is: bad144 wd0 bad block information at sector 1954827 in /dev/rwd0c: cartridge serial number: 1234(10) sn=1291132, cn=94, tn=96, sn=10 sn=1291535, cn=94, tn=102, sn=35 sn=1291938, cn=94, tn=108, sn=60 sn=1292341, cn=94, tn=115, sn=22 See also clri ports/sysutils/ffsrecov2 sysctl kern.geom.debugflags=16 ------------------------------------------------------------------------------- bash_EXAMPLE ulimit -u 100; fvwm --------- ^R Reverse Search ^S Search Forward ^P Previous ^N Next ^A Beginning ^E End Of Line ^D Del. Char ^F Forward Char ^B Back Char ------------------------------------------------------------------------------- bashrc_me@ fahr() { calc -q "$1 * 1.8 + 32" ; } cels() { calc -q "x = config(\"display\", 2) ; ($1 - 32) / 1.8" ; } mille() { while true ; do /usr/games/X11/xmille ~/xmille.sa done & } weedout() { for i in * ; do echo $i xv -imap -igeom -0+0 $i echo "now what? remove, move ? " read a if [ -n "$a" ] ; then if [ $a = r ] ; then echo "removing $i" rm $i else mv $i /usr4/pics/tmp fi fi done } u() { for i in $@ ; do a=`uuconc -v $i` echo $a DISPLAY=:0.0 xv -imap -igeom -0+0 $a echo "Now what? move or remove (m/r) \c" read b if [ $b = r ] ; then rm $a else if [ -f pics/$a ] ; then echo "really overwrite existing file \"pics/$a\" ? \c" read b if [ $b = y ] ; then mv $a pics fi else mv $a pics fi fi echo $i rm $i done } mlist() { ( builtin cd /usr/spool/smail/input ls | while read a ; do ll $a grep From: $a grep To: $a done | less ) } mlog() { tail -f /usr/spool/smail/log/logfile ; } zoout() { find $1 -print | zoo aIh $1 ; } machine() { if [ -f /usr/local/nethosts ] ; then grep $* /usr/local/nethosts fi grep $* /etc/hosts ; } tel() { grep -i $* $h/.telnos ; } cpout() { find $1 -print | cpio -ovmdDS >/dev/nris0 ; } mn() { ls $1 | while read name ; do echo $name: tbl $name | nroff -man -Tlp | col | less done ; } pm() { ps -fu $LOGNAME ; } px() { ps -ef | grep $1 | grep -v grep ; } killp() { px $1 | while read a1 a2 a3 a4 a5 a6 a7 do echo $a1 $a2 $a3 $a4 $a5 $a6 $a7 echo "Killen ? (j/n) \c" read killekille ---snip--- Needed computing power A recent test (GNU/Linux OS) with 0.60-beta2 showed 3% to 4% CPU usage on decoding high quality VBR MP3 with a pentiumII laptop with 366MHz, while a pentium 100MHz can easily handle two mpg123 instances in realtime (plus the mixing daemon that works on decoded data). Michael said once upon a time Plays Layer 3 in stereo on an AMD-486-120Mhz or (of course) a faster machine. Just for info: mpg123 plays an average 128bps stream, with about 66% in full quality on an AMD 486-133MHz machine. --------- Ian Smith > Given that my ATA DMA works, my 5.5 vs your 7, my 300MHz laptop plays an > (average) ~160kbps VBR .mp3 using about 20% CPU with xmms, or about 15% > with mpg123 -v. Doing little else, yours should just about make it, if > you can get ATA DMA working. Without DMA, hmm, it seems less likely, From: Thierry Herbelot Date: Sun, 20 Jan 2008 14:42:02 +0100 To: freebsd-hackers@freebsd.org Subject: Re: FreeBSD on non-fpu device mad is a good (integer-only) candidate for MP3 rendering with a slow CPU ------------------------------------------------------------------------------- sound stick formats: ogg: gnu max compact free wav bulky mp3 rights reg with fraunhofer drm digital rights management (for legal download) (f)wma mickeysoft ------------------------------------------------------------------------------- claws-mail # a succesor to sylpheed mailer user agent MUA To get GPG working: cd /usr/ports/security/pinentry-curses; make install cd /usr/ports/security/gnupg-devel; make install # for gpg-agent start gpg-agent: eval `gpg-agent --daemon` echo $GPG_AGENT_INFO >$HOME/.gpg-agent-info generate a PGP key enable the following plugins in claws-mail using Configuration -> Plugins PGP/Core PGP/inline PGP/MIME Turn on PGP in Configuration -> Preferences -> Privacy cd .claws-mail ; grep -l mail.js.berklix.net * # accountrc menurc ------------------------------------------------------------------------------- lame # /usr/ports/audio/lame # does a wav2mp3 conversion works on wav from cd, # but not wav from clipman cd wav; foreach i ( *.wav ) lame $i ../mp3/`basename $i .wav`.mp3 end # lame on same host called twice produces same content. # lame on different hosts fire & laps produces same size # different content both playable. ------------------------------------------------------------------------------- lib Libraries have been installed in: /usr/local/lib If you want to link against installed libraries in a given directory, LIBDIR, you must either use libtool, and specify the full pathname of the library, or use the `-LLIBDIR' flag during linking and do at least one of the following: - add LIBDIR to the `LD_LIBRARY_PATH' environment variable during execution - add LIBDIR to the `LD_RUN_PATH' environment variable during linking - use the `-Wl,--rpath -Wl,LIBDIR' linker flag man ld(1) and ld.so(8) ------------------------------------------------------------------------------- realplay http://www.bbc.co.uk/worldservice/ram/live_infent.ram install the /usr/ports/multimedia/linux-realplayer Linux emulation enabled ------------------------------------------------------------------------------- ripit is a graphic front end to lame, gary reccomends 192 kbs ------------------------------------------------------------------------------- wav2mp3 # not installed, but web search: http://wav2mp3lame.sourceforge.net/ Welcome to the homepage of Wav2MP3 Wizard, the lightest and fastest GUI for the 3 most-widely used open-source encoders; LAME, BladeEnc and OGG Vorbis. ---- clipman generates both 32 kbps .wav files & 8bkps .act files ------------------------------------------------------------------------------- mp3 tools: audio/id3ed An id3 tag editor for mp3 files audio/id3tool A utility for manipulating mp3 ID3 Tags audio/mp3butler A program for renaming mp3 files audio/mp3info Tool to manipulate ID3 tags for MP3 files audio/mp3rename A renaming program for mp3 files based on their id3tag audio/yamt helps you to organize your mp3s audio/mp3ck scanner for truncated, better than mpck various others via: cd /usr/ports/audio;grep -l -i mp3 */pkg-descr|xargs grep -i check ------------------------------------------------------------------------------- chflags (BSD) Linux similarity is chattr ------------------------------------------------------------------------------- cdrecord cdrecord -dummy -v speed=2 dev=6,0 -data 4.3-install.iso cdrecord -dummy -v speed=2 dev=6,0 -data image.iso # fast cdrecord fs=90m -dummy -v dev=6,0 -data image.iso # desperate cdrecord -v -dummy dev=6,0 padsize=600m /dev/null # test for buffer underruns cdrecord blank=all rtprio 20 cdrecord -dummy -v dev=6,0 -data image.iso See ports/ sysutils/cdrtools sysutils/k3b KDE based sysutils/eroaster Gnome based src/ burncd - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - DVD burning mkisofs -r -J -o av.iso 1.avi Fails with host=loft, pwd=/usb/disk60.ufs/avi/3/B * cmd=mkisofs -r -J -o /host/fire/usr2/tmp/B.iso *.avi with sizes: 1568835080 1.avi 1381868438 2.avi 1453969470 3.avi Error report: 97.40% done, estimate finish Mon Mar 12 19:23:25 2007 mkisofs: File too large. cannot fwrite 32768*1 Changing platform solved it, Works, using: host=fire, pwd=/host/loft/usb/disk60.ufs/avi/3/A cmd=mkisofs -r -J -o /usr2/tmp/A.iso * Maybe above is NFS having a crisis on large files. growisofs -dry-run -dvd-compat -Z /dev/cd0=k3b_image.iso Erase a dvd-rw:growisofs -Z /dev/cd2=/dev/zero fails: 4701552640/4706074624 (99.9%) @3.9x, remaining 0:00 RBU 100.0% :-[ WRITE@LBA=231020h failed with SK=5h/ASC=21h/ACQ=00h]: No space left on devic ------- 4689133568/4706074624 (99.6%) @3.9x, remaining 0:03 RBU 100.0% :-[ WRITE@LBA=231020h failed with SK=5h/ASC=21h/ACQ=00h]: No space left on device :-( write failed: No space left on device dvd+rw-format -force /dev/cd2 # delete date, slow got up to 8.2% & dropped out dvd+rw-format -lead-out /dev/cd2 # fast gj uses /usr/ports/sysutils/k3b which uses sysutils/cdrdao ------------------------------------------------------------------------------- Elta can read dvd-rw ELta did not list for playing: .mpa .wmv ELta did list for playing .avi, but could not play, what file reported as RIFF (little-endian) data, AVI, 320 x 240, ~15 fps, video: Motion JPEG, audio: uncompressed PCM (mono, 11024 Hz) Elta can play other avi ie what file reports as either RIFF (little-endian) data, AVI, 720 x 540, 25.00 fps, video: XviD, audio: MPEG-1 Layer 3 (stereo, 48000 Hz) RIFF (little-endian) data, AVI, 720 x 406, 25.00 fps, video: XviD, audio: MPEG-1 Layer 3 (stereo, 48000 Hz) recoverdm GJ: DVD with AVI had some bad blocks. ports/sysutils/recoverdm managed to salvage it, very slowly. except for some blocky artefacts it was fine. ------------------------------------------------------------------------------- csh #!/bin/csh if ( "x`filetest -e thing`" == "x1" ) then echo "Exists." else echo "Does not exist." endif set autologout = 30 # if you leave the shell idle for more than 30 seconds ------------------------------------------------------------------------------- cshrc_FROM_USR_GUEST # limit maxproc 100; fvwm unset histchars set histchars=',;%' if ($?prompt) then set mail=/usr/spool/mail/$USER switch ($prompt:q) case '# ': set prompt=">`hostname`< " breaksw case '% ': set prompt="<`hostname`> " breaksw default: set prompt="`hostname`!`whoami` " endsw set cdpath=(/usr/src/sys /usr/src/cmd ~ ~/working) set history=60 alias tset 'set xx=$histchars; set histchars=""; unset history; /usr/ucb/tset -s -Q \,* > /tmp/tset$$ ; source /tmp/tset$$ ; rm /tmp/tset$$; set history=60; set histchars=$xx; unset xx' alias a alias a ls 'ls -F' alias setup 'sccs admin -i \,:1 < \,:1' a pwd 'echo $cwd' a pv printenv a sv setenv a so source a d dirs a j jobs a h history a pd pushd a p popd a tag 'vi -ta \,*' a nd 'nm -nr \,* |grep " [DBdb] " |more' a reset 'reset ; stty -tabs' a RESET reset a notes 'cp ~/notes ~/oldnotes/notes.$$ ; date >> notes ; vi ~/notes ; cp notes notes.bak' a c 'pushd \,* ' a .stand 'c stand' a .sys 'c sys' a .src 'c src' endif ------------------------------------------------------------------------------- cthumb # A themable web picture album generator For web first shrink size x 2 with xv & allow default Q factor 75% or so. cthumb -c *[0-9][0-9][0-9][0-9].jpg dsc*.jpg > album.cthumb vi -c/"Undefined Title" album.cthumb n ^Z pwd mouse cp fg 2cw :s/_/ /g cthumb album.cthumb ; ln -s index.shtml index.html vi -c/"This is the Title for Page 1" index.html n 7cw Click Here. vi -c/"This is the Title for Page 1" page.html nn 7cw Click a picture for larger. # Still need to add *.avi handling ------------------------------------------------------------------------------- conscontrol /boot/loader.conf: console="comconsole" ------------------------------------------------------------------------------- TORRENT ctorrent -h http://ctorrent.sourceforge.net/?action=faq&id=7 Once CTorrent starts to download, all you will see is 1 line of status. It's kind of hard to interpret what all the numbers mean, so here's an example: 10, [0/334/331], 6070,9845, | 5004,3984 E:3 10 - Number of connected peers (other people who have the file you are downloading) 0/334/331 - Downloaded/Total/Available pieces of the file. All pieces may not be availabe at all times since peers go offline. 6070,9845 - Average downloadspeed (in bytes/s), Average uploadspeed (in bytes/s) 5004,3984 - Current downloadspeed (in bytes/s), Current uploadspeed (in bytes/s) E:3 - The tracker has refused connections 3 times. Hangs for me, I switrched to using btdownloadheadless.py from ports/net/py-bittorrent Other reccomended: -current/ports/net/azureus not in 5.3-release & "only for i386" torrentflux needs MySQL, PHP, and Apache to use it, but for me it works great since I can add/remove/manage my torrents from any machine on my network via browser, while actually running the bittorrent client on my big storage box. http://www.torrentflux.com/ also, to get it working, I had to add this to my /etc/sysctl.conf: kern.ps_arg_cache_limit=1024 ------------------------------------------------------------------------------- cvs Examples of syntax that works (except where noted otherwise) man cvs examples an ISO date of "1972-09-24 20:05" http://www.FreeBSD.org/releases/ Tag Module # Notes RELENG_6_0 Release 6.0 RELENG_6_1 RC release candidates, releases, & security fixes to RELENG_6_1_0_RELEASE. RELENG_6 Moving Stable, passing through 6.* stable. security updates, fixes & enhancements cvs -R export -r HEAD doc cvs -R export -r RELENG_7 src # du=485M, kensmith@@cse._NO_SPAM_.Buffalo.EDU confirms this tag OK to upfate from 7.0-BETA2 to newer. cvs -R export -r RELENG_7_0_0_RELEASE src # du=487 M, tgz=106 M cvs -R export -r RELEASE_7_0_0 ports # du=372 M, tgz=39 M cvs -R export -r RELEASE_7_0_0 doc # du=86 M, tgz=23 M cvs -R export -r RELENG_6_3_0_RELEASE src # du=445 M, tgz=97 M cvs -R export -r RELEASE_6_3_0 ports # du=371 M, tgz=39 M cvs -R export -r RELEASE_6_3_0 doc # du=85M , tgz=23 M cvs -R export -r RELENG_6_2_0_RELEASE src # du=438 M, tgz=96 M cvs -R export -r RELEASE_6_2_0 ports # du=332 M, tgz=36 M cvs -R export -r RELEASE_6_2_0 doc # du=74M , tgz=19 M cvs -R export -r RELENG_5_5_0_RELEASE src # du=413 ,tgz=96 M cvs -R export -r RELEASE_5_5_0 ports # du=292 ,tgz=31 M cvs -R export -r RELEASE_5_5_0 doc # du=75M ,tgz=23 M cvs -R export -r RELENG_4_11_0_RELEASE src cvs -R export -r RELEASE_4_11_0 ports cvs -R export -r RELEASE_4_11_0 doc cvs -R export -r RELENG_4_6 src cvs -R export -r RELENG_5 src cvs -R export -r RELENG_4 src cvs -R export -r HEAD ports cvs -R export -D"12-Jan-2004" www cvs -R export -r v1_0 www cvs -R export -r HEAD www cvs -R export -D1-Oct vi cvs -R co -D4-Aug sys cvs -R co -D"9-Feb-97" sys cvs -R export -r RELENG_2_2 mk cvs -R -d /usr/cvs co -P -r RELENG_4_2_0_RELEASE src # What release calls Tags (EG CSRG, bsd_44_lite, RELENG_4_1_0_RELEASE) /usr/cvs/{src.ports,doc}/Makefile,v (www/ has no tags) Modules (EG src ports mk sys chimera) /usr/cvs/CVSROOT/modules cd /usr/cvs/src/release/texts/i386 ; vi -c/"FreeBSD Release" RELNOTES.TXT,v Number of commiters: cvs co -p CVSROOT-src/access CVSROOT-doc/access CVSROOT-ports/access 2>/dev/null | grep -v ^# | awk '{print $1}' | sort -u | wc -l % cd /cvs/FreeBSD/CVSROOT-src/commitlogs # choose repository % gzip -dcfq * | awk ' /^[a-z][a-z]*/ { count[$1]++ } \ END { for (c in count) { print count[c], c } } ' | \ sort -nr | less ----------------------------------------------------------------------------- -R still fails on 4.5 with cvs -R export -r RELENG_4_6_0_RELEASE src cvs [export aborted]: cannot write /public/freebsd/ref/cvs/cvs/CVSROOT/val-tags: Permission denied /public/freebsd/ref/cvs/cvs/CVSROOT/ drwxr-xr-x 6 daemon daemon 1536 Jun 17 17:55 ./ drwxr-xr-x 10 daemon daemon 512 Apr 25 02:35 ../ containing no val-tags ----------------------------------------------------------------------------- RELENG_x_y_z_RELEASE The tag (not branch) of the x.y.z release. RELENG_x_y_BP Branch point to the x.y release branch. Perhaps allows cvs diff -r RELENG_x_y_BP -r HEAD src RELENG_3_2_PAO commited by Warner Losh = 3.2 Release + PAO3 patches to 3.2, not RELENG_3 + PAO. Most can be found, by doing a cvs log on /usr/src/Makefile ----------------------------------------------------------------------------- Examples: cvs -R -q checkout contrib_ipfilter ipf ipfstat ipftest kld_ipfilter cvs -R -q log | grep '^date' | wc -l cvs -R -q log | grep '^date' | grep darrenr | wc -l # cvs co module_name # see ${CVSROOT}/CVSROOT/modules for a map # cd module_name # vi foo bar zeek # cvs commit # cd .. # cvs release -d module_name ----------------------------------------------------------------------------- Other /usr/cvs/src/ files to check for EG "4.6-PRERELEASE" release/doc/share/sgml/release.ent,v sys/conf/newvers.sh,v sys/sys/param.h,v ----------------------------------------------------------------------------- OPENBSD setenv CVSROOT /usr2/ftp/public/openbsd/work/cvs cvs export -r OPENBSD_2_6 src cvs export: /usr2/ftp/public/openbsd/work/cvs/CVSROOT/config:\ unrecognized keyword 'tag' cvs export -r OPENBSD_2_5 src cvs export: /usr2/ftp/public/openbsd/work/cvs/CVSROOT/config: unrecognized keyword 'tag' cvs export -r OPENBSD_2_5_BASE src cvs export: /usr2/ftp/public/openbsd/work/cvs/CVSROOT/config: unrecognized keyword 'tag' 2 commands above produce an identical list of files, & only the contents of these are different: src/gnu/usr.bin/cvs/doc/cvs.info-4 src/gnu/usr.bin/cvs/doc/cvs.info-7 src/gnu/usr.bin/cvs/doc/cvs.ps src/usr.sbin/afs/src/INSTALL src/usr.sbin/afs/src/README src/usr.sbin/dhcp/server/dhcpd.c for dhcpd.c, OPENBSD_2_5_BASE gives a more complete message [] Looking at the sequential list in src/Makefile,v, I guess OPENBSD_2_5_BASE is the provisional, & OPENBSD_2_5 is the final. cvs export -r OPENBSD_2_5 ports # & cvs export -r OPENBSD_2_4 ports cvs [export aborted]: no such tag OPENBSD_2_5 nothing useful produced cvs export -r HEAD www 6.4 Meg. ----------------------------------------------------------------------------- NETBSD Tags 1.4 netbsd-1-4-RELEASE 1.4.1 netbsd-1-4-PATCH001 1.4-willbe-2 netbsd-1-4 The latter is the "1.4 release branch tag". When 1.4.2 is released, it will be tagged with netbsd-1-4-PATCH002. cvs -r netbsd-1-5 ------------------------------------------------------------------------------- cvsup Now replaced by src/usr.bin/csup if you cvsup to RELENG_4 /usr/src/sys/conf/newvers.sh REVISION="4.10" BRANCH="RC" BRANCH="BETA" -> "PRERELEASE" you'll get BRANCH="RC" if you cvsup to RELENG_4_10 ------ I can not access the internet without going through the firewall. -- I use to run small redirector (plug) on server with public IP address and then on client cvsup -g -L 2 -P m /etc/cvsupfile. -- It is a little tricky (IMHO) to set up, but you can use m3socks to allow cvsup to use a SOCKS proxy, if you have one of those. I'm also behind a firewall so that is what I did. -- man cvsup has more ideas -- gj 2002.10 recs. cvsup5.de.freebsd.org = ecrc -- gj@2004.12: If you already have a populated /usr/obj from a previous ``make buildworld'', then this (bash) alias can speed up generating new binaries after a cvsup: alias mwq='cd /usr/src;make -s _obj _includes _libraries _depend \ everything' If it fails then just do a full ``make buildworld''. --- 2005.09 cebulon cd /root ; cvsup -g stable-supfile ------------------------------------------------------------------------------- dbx where ------------------------------------------------------------------------------- dd Equivalent of "dd if=bootimg.bin of=/dev/fd0.1440" on DOS, OS/2, MS-Win*: cd to _sys\bootdisk, then type: loaddskf boot-cd.dsk a: before dd'ing a dvd (bs=2k) one needs to first run eg mplayer probably to convince driver to ignore CRC errors or soemthing like that. ------------------------------------------------------------------------------- ddb to activate ddb (eg on a usb hang): ctl alt esc DDB_UNATTENDED trace ps panic ------------------------------------------------------------------------------- dig dig @ip-of-nameserver mydomain.com mx dig -x IP_address ------------------------------------------------------------------------------- DOC FORMAT If someone sends you a nasty proprietary Microsoft .doc format file, FreeBSD offers you the following (incomplete) list of /usr/ports/ ways of accesing that file: textproc/antiword And monster packages: editors/staroffice70 editors/openofficea.org-2.0 editors/koffice-kde3 + Commercial packages: ApplixWare ------------------------------------------------------------------------------- disklabel disklabel -w -r wd0 c_wd0 disklabel -w -r da4 DNES-309170W label rescue: http://lists.freebsd.org/pipermail/freebsd-questions/2007-December/165187.html http://www.42.org/~sec/resources/disklabel.html http://www.leidinger.net/FreeBSD/ffsrescue.tar.gz ------------------------------------------------------------------------------- dvdrip Helped by in /etc/rc.local: sysctl vfs.usermount=1 Needs rar, rar wont built without /usr/local/lib/compat/libc.so.5 ldconfig /usr/local/lib/compat ignoring directory not owned by root chown root /usr/local/lib/compat ldconfig /usr/local/lib/compat See Also: acidrip, dvdbackup, vobcopy, lsdvd ------------------------------------------------------------------------------- vobcopy -b 50m used by a poster to watch Casino Royal & DaVinci Code he'd rented. ------------------------------------------------------------------------------- exmh Screwed graphics of all rectangular buttons: Sample "Encrypt-only outgoing messages" & "Log: View Tail" Thick top left edges + thin base right edges = On Thin top left edges + Thick base right edges = Off Diamond 1 of N selectors: Thick top left & right + thin base left & right = Selected. Thin top left & right + thick base left & right = Not Selected. Warning exmh breaks any symbolic links created by such as ln -s exmh-defaults exmh-defaults.`hostname -s` so I need to manually copy over whichever host I'm running on. To send gpg keys more sedit more attachment pgp keys Start exmh with an agent so it has passphrase to decrpt: eval `q-agent -c -q -g &` ; exmh To ensure gpg talks in English to EXMH, even if default (login) language is other by "Klaus Elsbernd" #!/bin/sh volcheck LANG=de LANGUAGE=en LC_ALL=de_DE.ISO8859-1 PATH=/usr/dt/bin:$PATH; MM_CHARSET=iso-8859-1 export LANG LANGUAGE LC_ALL PATH MM_CHARSET ; umask 7 /opt/dfki/bin/exmh $* To fetch passphrase for GPG, install security/quintuple-agent {Harv I've been using exmh with pgp/gpg for many years. I'm currently using exmh 2.7.2 with gpg 1.4.9 on RedHat (Linux 2.6.9). Comparing your exmh default with mine, I see the following gpg differences: gpgCacheIds: persistent DONE gpgKeyQueryMethod: hkp DONE gpgShortMessages: 0 DONE gpgShowInline: none was all I suspect the use of "gpgShowInline: all" and/or "gpgKeyQueryMethod: email" may be relevant to explaining the behavior you're seeing. Harv } {Klaus setting "show pgp messages inline" to all DONE "short gnupg reports" to off DONE will deliver more info. } My notes Keep PGP passphrase I leave it OFF. If on cant decrypt q-agent -d complains On sending crypted, if error box: couldn't open "/usra/home/jhs/tmp/0.pgp.4464.exmh": no such file or directory & error log: gpg --batch --status-fd 2 --no-greeting --comment Exmh version 2.7.2 01/07/2005 --force-v3-sigs --cipher-algo 3des --digest-algo sha1 --compress-algo 1 -eat -o /usra/home/jhs/tmp/0.pgp.4464.exmh -r 0xABCDEF12 -r 0xABCDEF13 /home/jhs/tmp/1.msg.4464.exmh |& cat {: Exit status: 1 NONE} {Pgp_Exec_CheckSuccess gpg /usra/home/jhs/tmp/0.pgp.4464.exmh gpg: 21DE9751: There is no assurance this key belongs to the named user [GNUPG:] INV_RECP 10 0xABCDEF13 gpg: /usra/home/jhs/tmp/1.msg.4464.exmh: encryption failed: unusable public key Then gpg --sign-key friend@his.domain # see gpg ------------------------------------------------------------------------------- GPG Ex PGP gpg --gen-key gpg --list-keys gpg --list-public-keys gpg --list-secret-keys gpg --delete-key "Julian H. Stacey" gpg --delete-secret-keys "Julian H. Stacey" gpg -a --export "Julian H. Stacey" > Julian_H._Stacey.asc gpg -a --fingerprint from_backup_host: gpg -a --export "Julian H. Stacey" > x.pub to_main_host: gpg --import x.pub from_backup_host: gpg -a --export-secret-keys "Julian H. Stacey" > x.pri to_main_host: gpg --keyring ~/.gnupg/secring.gpg --import x.pri gpg -a -e enclosure_to_encrypt > out gpg --list-keys "Julian H. Stacey" # shows 2 gpg --list-keys "Julian H. Stacey (20080604103910)" # shows 1 gpg -a --export "Julian H. Stacey (20080604103910)" gpg -a --fingerprint "Julian H. Stacey (20080604103910)" gpg -a --import < gj_public_key gpg --edit-key gpg --sign-key friend@his.domain # see exmh Until you do this the key is not trusted & a mailer might spring an interactive window, but if like exmh it uses batch mode, then you cant send to that person. The difference is not visible with gpg --list-keys but is visible with gpg --sign-key friend@his.domain ------ Before pub 1024D/56D81332 created: 2008-06-03 expires: never usage: SC trust: unknown validity: unknown sub 2048g/F61A79A1 created: 2008-06-03 expires: never usage: E [ unknown] (1). First Last (Middle name) ------ After pub 1024D/56D81332 created: 2008-06-03 expires: never usage: SC trust: unknown validity: full sub 2048g/F61A79A1 created: 2008-06-03 expires: never usage: E [ full ] (1). First Last (Middle name) ------ ------------------------------------------------------------------------------- gpg-agent cd /usr/ports/security/gnupg-devel/work/gnupg-1.9.22/doc ; make chimera gpg-agent.html gpg-agent --verbose ------------------------------------------------------------------------------- emacs ESC = 8 bit prefix ALT = Assert bit 8 End: C-x C-c View Forward Screen C-v View backward Screen M-v Redraw & Centre C-c C-p C-b C-f C-n ------------------------------------------------------------------------------- fetch fetch ftp://ftp2.de.freebsd.org/pub/misc/FreeBSD/releases/i386/ISO-IMAGES/4.6.2/CHECKSUM.MD5 fetch ftp://iso.de.netbsd.org/pub/NetBSD/iso/1.6/README # fails - Leo breaks when accessed through proxy /usr/ports/ftp/ftpproxy fetch ftp://iso.fr.netbsd.org/pub/NetBSD/iso/1.6/README # works OK when accessed through proxy /usr/ports/ftp/ftpproxy fetch -A ftp://ftp.de.freebsd.org/pub/FreeBSD/ISO-IMAGES-i386/4.9/4.9-i386-disc2.iso fetch -A ftp://ftp.de.netbsd.org/......... fetch -A ftp://ftp.xfree86.org/pub/XFree86/3.3.6/source/X336src-1.tgz fetch -o - ftp://ftp.nuug.no/pub/anders/distfiles/gnokii-0.4.3.tar.gz > t ctm: ftp.vmunix.org Erding. Stephen M says tends to be very up to date. From: Gary Jennejohn : + # I wrote fetch because it was not possible tu use ncftp with some of + # the ports/print files :-) + # The problem arise when the server runs wu-ftpd and when you fetch a + # directory, adding .tar.gz to the name of the directory. Ncftp can't + # do that cleanly (try it!), and we need to: + # 1- login + # 2- change the directory (the -c flag of fetch) + # 3- get the directory (.tar.gz). In order to make fetch (the FreeBSD downloading tool) ask for username/password when it encounter a password-protected web page, you can set the environment variable HTTP_AUTH to 'basic:*'. ------------------------------------------------------------------------------- fetchmail fetchmail -u jhs-xyz bim.xyz ------------------------------------------------------------------------------- find find . -type f \! -perm -1 | xargs file | grep "shell script" To look for all shell files that have missing execute bit, ie after cvs export -r OPENBSD_2_6 src make build fails at usr.sbin/httpd/src/helpers/PrintPath find . -type f -perm +04000 ------------------------------------------------------------------------------- gcc for FreeBSD-current __FreeBSD_version >= 400011 ------------------------------------------------------------------------------- GDB cd /usr/src/usr.bin/make setenv CFLAGS "-g" make clean ; make cleandir ; make clean ; make ; xs make install limit coredumpsize unlimited cd /usr/home/jhs/job/handout.crash make clean make gdb directory /usr/src/usr.bin/make core-file /usr/home/jhs/job/handout.crash/make.core exec-file /usr/src/usr.bin/make/make symbol-file /usr/src/usr.bin/make/make run bt ---------- gdb gdb /path/to/Mosaic /path/to/core gdb cc1 core disasm gdb X386 break exit /stop/abort run ======== # gdb tab core.tab # set args -e data # exec-file tab # core-file tab.core # break exit /stop/abort # run

    Generated Wed Dec 11 19:29:52 MET 1996 by Makefile

  • ./Makefile
     # ~jhs/public_html/syntax/Makefile by Julian Stacey
     
  • ./adb
     adb /gt/lft/etc/lfta [core]
     $c backtrace
     
  • ./bash_example
     ulimit -u 100; fvwm
     ---------
     
  • ./bashrc_me
     fahr() { calc -q "$1 * 1.8 + 32" ; }
     cels() { calc -q "x = config(\"display\", 2) ; ($1 - 32) / 1.8" ; }
     
  • ./binhex
     echo How jhs converted a Content-Type: application/mac-binhex40
     echo for Helmut Eichler Apr 96
     
  • ./csh
     #!/bin/csh
     
  • ./cshrc_from_usr_guest
     # limit maxproc 100; fvwm
     
  • ./cvs
     cd tmp
     cvs co -D4-Aug sys
     
  • ./emacs
     ESC = 8 bit prefix
     ALT = Assert bit 8
     
  • ./gdb
     gdb cc1 core
     disasm
     
  • ./kgdb
     > Rich's question about pointers for debugging the kernel made me try the
     > following, which works quite well if you have the kernel sources and enough
     
  • ./netscape
     netscape -display tartufo:0.0 -remote 'openURL(www.dec.com)'
     
  • ./perl.showLinks.jkh
     #!/opt/gnu/bin/perl
     require 'find.pl';
     
  • ./rz
     rz -b < /dev/tty1 > /dev/tty1
     
  • ./scsi
     Syntax example from joerg_wunsch@@uriah.heep.sax.de :
    	scsi -f /dev/rsd0.ctl -r -t 5
     
  • ./shar
     echo run this script by saying sh this_file_name
     echo x - dtree.1
     
  • ./sort
     sort -n -t: +3 -4 /etc/passwd
    	sort /etc/passwd by group no.
     
  • ./sysctl
     Syntax example from rgrimes@@gndrsh.aac.dev.com:
    	sysctl -w net.inet.ip.forwarding=1
     
  • ./vi
     !}sort		sort paragraph
     !)rev		reverse sentence
     

  • ------------------------------------------------------------------------------- ifconfig rl0 alias 194.221.32.28 netmask 0xffffffff ------------------------------------------------------------------------------- k3b ew @ 2004.06: app for kde but as a GUI it puts some of the WINdum stuff on the run. it is easier to make a image of a DVD first and then burn it, much faster. ------------------------------------------------------------------------------- KDE: isn't like fvwm, there isn't just one configuration file. The configs are scattered around in various locations. What I do to start kde is call /usr/local/bin/startkde in my .xinitrc. startkde is a shell script and starts the most commonly needed elements. I suggest that you edit startkde to set the KDEDIR (/usr/local) variable and comment out kaudioserver (which is buggy and core dumps). Another thing which I did was to get rid o klock by making a symbolic from /usr/bin/false to /usr/local/bin/klock. klock doesn't understand our shadow password file and, if you accidentally invoke it, you can't log back in. Look in ~/.kde/share/config for some of the user-modifiable config files. These can also be managed using some KDE utitlity, but I don't know which one. I just edited them by hand. Ernst would probably know. Once the control panel is running (the bar at the bottom) you can click on the big "K" on the left, go up to applink and invoke kdehelp for an overview. Gary ------------------------------------------------------------------------------- kermit PC kermit3.01: TERM=tset - vt102 alt x or ctrl shift backslash goes to control mode alt h ------------------------------------------------------------------------------- kgdb > Rich's question about pointers for debugging the kernel made me try the > following, which works quite well if you have the kernel sources and enough > swap space for a proper crash dump: > > Config you're kernel using config -g > > Remove ${STRIP} -x $@; from the Makefile for the kernel so it doesn't > get stripped. > > When the kernel's been built make a copy of it, say 386BSD.debug, and > then run strip -x on the original. Install the original as normal. > > Now, after a crash dump, go to /sys/compile/WHATEVER and run kgdb. From kgdb > do: > > symbol-file 386BSD.debug > exec-file /var/crash/system.0 > core-file /var/crash/ram.0 From freebsd.org!owner-freebsd-current Tue Jun 14 06:00:41 1994 Date: Tue, 14 Jun 1994 05:51:42 +0200 From: rich@@id.slip.bcm.tmc.edu (Rich Murphey) To: FreeBSD-current@@freebsd.org Reply-To: rich@@freebsd.org OK, thanks to Paul Richards and Garrett Wollman for all the info on debugging crash dumps. Here's a rehash of their info from a novice perspective. To find out what is crashing your kernel, first install a kernel compiled with -g. Make sure you have 'dump on ...' as part of the configuration file (e.g. FOO) in order to enable crash dumps. cd /sys/i386/conf config -g FOO cd /sys/compile/FOO vi Makefile Change 'STRIP= strip' to 'STRIP= echo' at the head of the Makefile. make depend make mv /386bsd /386bsd~ cp 386bsd / shutdown -r now Next, make sure you have as much free disk space in /var/crash as you have ram. For example, if you have 16Mb of RAM in your PC, make sure the root partition has 16Mb free. If it doesn't, but /usr does, then: cd /var rmdir crash mkdir /usr/crash ln -s /usr/crash . If you include 'pseudo-device ddb' (the kernel debugger) in your config file then upon a panic the kernel will drop into the debugger and print a prompt. To get a core dump type: ddb> call boot(0x104) This will cause the the kernel to skip syncing the disk, save the crash dump and then reboot; dumping to dev ..., offset ... If it doesn't, make sure your kenrel config file for 'dump on ...' as in the GENERICAH config file. When it reboots after panicing, the system saves the crash dump: checking for core dump... System went down at ... If it doesn't, then make sure that you don't have a /var/crash/minfree file, or if you do that this file doesn't specify more memory than you have in /var/crash. See 'man savecore' for specifics. Now, after saving a crash dump, look in /var/crash for the most recent ram.* and system.* files. Each time it saves a crash dump it will create another ram.* and system.* file starting with ram.0 and system.0. To debug the crash dump type: cd /sys/compile/FOO kgdb symbol-file 386BSD.debug exec-file /var/crash/system.0 core-file /var/crash/ram.0 and it will respond with something similar to: IdlePTD 1b8000 panic: current pcb at 1a7a54 (kgdb) You can then use all the usual gdb commands to examine the kernel data. -- Rich ------------------------------------------------------------------------------- kldload procfs mount_procfs /dev/procfs /proc ------------------------------------------------------------------------------- # http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/sound-setup.html # man sound # music cd /boot/modules; kldload snd_driver; cat /dev/sndstat ------------------------------------------------------------------------------- ksh Find number of duplicate usernames in password file: #!/usr/local/bin/ksh VAR1=`awk -F: '{print $1}' /etc/passwd|grep -cx $1` print "Number of occurences of $1 in /etc/passwd: $VAR1" ------------------------------------------------------------------------------- MEMORY TESTERS: ftp://sunsite.unc.edu/pub/Linux/system/hardware/memtest86-1.4a.tar.gz ftp://ftp.cdrom.com/pub/simtelnet/msdos/memutil/ramtest.zip ftp://ftp.cdrom.com/pub/simtelnet/msdos/memutil/ramtst30.zip ------------------------------------------------------------------------------- magicpoint mgp /usr/X11R6/share/doc/mgp/sample/sample.mgp ------------------------------------------------------------------------------- mergemaster -sicvP # more strict mergemaster -icvP # see also ports/sysutils/etcmerge /usr/local/sbin/portupgrade # /usr/ports/sysutils/portupgrade tar cf /usr/var.db.pkg.backup.tar /var/db/pkg portupgrade -a -n -PP # dummy run to see what happens. pkgdb -F See also ports/sysutils/etcmerge ------------------------------------------------------------------------------- mformat fdformat -y /dev/fd0 ; mformat -s 80 -t 18 -h 2 a: ------------------------------------------------------------------------------- mixer vol 100 ------------------------------------------------------------------------------- mkfs mkfs -d0 -n1 ------------------------------------------------------------------------------- mkisofs mkisofs -r -A "FreeBSD 4.3 distfiles" -o ../dists43.cd . mkisofs -r -A "FreeBSD distfiles 4.5 2 of 3" -volset-size 3 -volset-seqno 2 \ -o ../cd.iso `cat ../cd.lst` mkisofs -r -A "Julians Web" -o ../julian_web.iso . # just a trial run may need more flags mkisofs -r -A "Global Warming Swindle" -o global_warming_swindle.iso \ -iso-level 1 SWINDLE.AVI # http://en.wikipedia.org/wiki/Martin_Durkin_(television_director) ------------------------------------------------------------------------------- mount Examples from SCO leaflet: DEC Unix 3.0 mount -t cdfs -o ro,noversion /dev/cddev cddir HP-UX 9.01 mount /dev/dsk/cddev cddir -r -t cdfs HP-UX 10.01 mount /dev/dsk/cddev cddir -r -F cdfs IBM AIX 3.2.5 mount -v cdfs -r /dev/cddev cddir SCO OpenServer5 mount -f HS -o ro,lower /dev/cddev cddir SCO UnixWare2.1 mount -F cdfs -r /dev/cdrom/cddev cddir SCO UnixWare2.1 mount -r -F cdfs `devattr cdrom|bdevice` /mnt SparcSolaris2.3 mount -F hsfs -o ro,nrr /dev/cddev cddir SparcSunOS4.1.2 mount -t hsfs -o ro,nrr /dev/cddev cddir ------------------------------------------------------------------------------- mtree setenv DESTDIR /host/bla/usr/tmp/dist ; cd /usr/src/etc ; make distrib-dirs cd ~jhs/public_html/src/bsd/jhs/etc ; make install ------------------------------------------------------------------------------- ncftp This syntax (run on wind) ncftp ftp://ftp/public/FreeBSD/distfiles/bash-1.14.7.tar.gz will sometimes shorten or truncate bash-1.14.7.tar.gz the data is not delivered to CWD but is instead written back to /public, which is NFS mounted, to flip, hence race conditions determine if a file is truncated ------------------------------------------------------------------------------- netscape netscape -display tartufo:0.0 -remote 'openURL(www.dec.com)' ------------------------------------------------------------------------------- netstat -nra -f inet ------------------------------------------------------------------------------- nmap -sS -sU -O another_FreeBSD-4.n_server nmap -sS -sU -O -P0 another_FreeBSD-4.n_server ------------------------------------------------------------------------------- nslookup (see also dig) set type=mx bsd.berklix.com ------------------------------------------------------------------------------- oo OpenOffice oo .odp Click on F5 to start slide show. Click on slide for next slide or effect. Right click show little menu to go to previous slide or end show. An OO file is nothing but a zip archive of several XML files (which is what Unix "file" shows it as. oo even accepts if invoked as "oo slides.zip", but oo fails on "mkdir x; cd x;unzip ../slide.zip;oo" ------------------------------------------------------------------------------- OCR ports/editors/AbiWord/ clara # ports/graphics/claraocr/ packages/claraocr-0.9.9_1.tgz ------------------------------------------------------------------------------- use.perl PERL.SHOWLINKS.JKH #!/opt/gnu/bin/perl require 'find.pl'; # Usage: showLinks # This program displays all the existing soft-links in a directory tree, # in the form: # file link # (tab-separated) # This can be used in conjunction with makeLinks to change existing links # in a tree to point to a new location. # See makeLinks for details. # This program is generic. sub wanted { local($dev) = lstat($_); $prune = ($dev != $topdev); return unless (-l $_); print "$name\t", readlink($_), "\n"; } if ($#ARGV < 0) { $dir = '.'; } else { $dir = shift; } &find($dir); ------------------------------------------------------------------------------- pib psearch ------------------------------------------------------------------------------- Postfix From: "Ben C.O.Grimm" To: freebsd-isp@@FreeBSD.ORG Subject: Re: VIRUS WARNING Date: Thu, 04 May 2000 18:46:14 +0200 For anyone using Postfix: in /etc/postfix/main.cf header_checks = regexp:/etc/postfix/love_access in /etc/postfix/love_access: /^Subject:.*ILOVEYOU/ REJECT Resulting message: May 4 18:12:15 smtp postfix/cleanup[36586]: warning: 2A645C1CB8: reject: header Subject: ILOVEYOU ------------------------------------------------------------------------------- PPP Notes netgraph ppp modules --used by mpd kernel async ppp --used by pppd kernel sync ppp (sppp) used by isdn and other sync stuff. USERLAND ppp (/usr/sbin/ppp) -- does it all outside the kernel. ------------------------------------------------------------------------------- QMAIL Next line is an exact copy of .qmail-jhs-default on colin |preline -d /usr/bin/uux - -gC -a"${SENDER:-mailer-daemon@@muc.de}" jhs!rmail "($EXT2)" ------------------------------------------------------------------------------- rdist See also rsync & ports/sysutils/cpdup & ports/net/unison (2 way) Notes 2006.05 from Symmetric-BSD-4.2 rdist: # Warning: if rdist reports: # "no name for group 34" or "no password entry for uid 218" # the file does not get copied. # So create a dummy record in /etc/group or /etc/passwd # Warning: if rdist reports: # /usr.external/src/genix/usr/nsc/sact: No such file or directory # the file does not get copied. Same for /usr//ucb/w # All seem to fail as link count > 1 # Retry with -i on command line & install line still doesnt fix it. # (On 2006 modern FreeBSD, it's still not ideal: there it does install, # but breaks hard links ) # Warning: rdist does not install /dev/devices. ------------------------------------------------------------------------------- rz rz -b < /dev/tty1 > /dev/tty1 ------------------------------------------------------------------------------- restore (example from Symmetric BSD-4.2) restore xf /usr2/jhs/tape/root_fs.dump Specify next volume #: 1 ------------------------------------------------------------------------------- rsync rsync rsync://ftp.leo.org/ rsync -avrclHpt -v ftp.leo.org::Docs . rsync -avrclHpt -v \ --exclude=magazine \ --exclude=historic \ --exclude=standards/internet-drafts \ --exclude=techreports \ --delete-excluded \ ftp.leo.org::Docs . # internet-drafts valid for max 6 months, inappropriate to cite them other than as "work in progress". http://www.ietf.org # equivalent of ~ftp/pub/comp/doc/ # My Docs/standards/rfc has just 38M - why ? # ---- rsync -avrclHpt ftp.leo.org::DOS . # See Also ~/bin/.csh/netbsdrsync # See Also ~/bin/.csh/freebsdrsync rsync -avrclHpt ftp.leo.org::Docs . ------------------------------------------------------------------------------- SCSI Syntax example from joerg_wunsch@@uriah.heep.sax.de : scsi -f /dev/rsd0.ctl -r -t 5 probe SCSI target 5 when there's only sd0 already online scsi -f /dev/st1ctl.3 -r -t 3 camcontrol stop da1 To make sure you've got auto read and write reallocation turned on. camcontrol modepage -n da -u 0 -m 1 -P 3 If AWRE and/or ARRE are set to 0, type this: camcontrol modepage -n da -u 0 -m 1 -P 3 -e And change the values to 1. That will make sure that if possible, any future bad blocks will be automatically remapped. ------------------------------------------------------------------------------- sendmail /etc/mail/access file, which you can set up your relay hosts in. It is simply a matter of adding your subnet(s) to the file. eg. 127.0.0.1 RELAY 203.54.200 RELAY Then: makmap hash access.db < access killall -1 sendmail - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Date: Thu, 04 May 2000 11:06:35 -0500 From: Chris Cook Cc: freebsd-isp@@FreeBSD.ORG Subject: Re: VIRUS WARNING Yes, and it will screw up a winblows system... here is a filter for your sendmail.cf file: ################ ## VIRUS CRAP ## ################ HSubject: $>Check_Subject D{MPat}ILOVEYOU D{MMsg}This message may contain the ILOVEYOU virus. SCheck_Subject R${MPat} $* $#error $: 553 ${MMsg} RRe: ${MPat} $* $#error $: 553 ${MMsg} ** MAKE SURE YOU PUT A TAB AFTER THE $* SIGNS ** ----------------------------------- How do I find sendmail's version number? telnet that.host 25 or echo \$Z | /usr/sbin/sendmail -bt -d0 ------------------------------------------------------------------------------- sh #!/bin/sh # ensure correct shell set -ex # shows each line executing set -e # ? _RELTARGET=${1:-doRELEASE} # conditional assignment $1 or doRELEASE . script_name # run that tfile And inherit set variables from it export TERM; TERM=`tset - $term` see /also /etc/rc if [ \( "X${ether_pccard}" != X"YES" \) -o \ \( "X$1" != "X"ether_pccard \) ]; then fi if [ ! -f /tmp/.world_done ]; then echo yes it exists fi : examples of bourne shell syntax by jhs if [ $OP_SYS_TYPE = "msdos" ] ; then echo "msdos" ; elif [ $OP_SYS_TYPE = "unix" ] ; then echo "unix" ; else echo "unknown" ; fi for i in /etc/* do ls -l $i done : ${PRUNEPATHS:="/tmp /usr/tmp /var/tmp"} # unwanted directories >/dev/null 2>&1 # from /etc/rc --------- example of a shell function echo-en() { x="$*" echo -e "$x" | dd bs=$((${#x}-1)) count=1 2>/dev/null } ------------------------------------------------------------------------------- shar echo run this script by saying sh this_file_name echo x - dtree.1 sed 's/^ //' > "dtree.1" << '//E*O*F dtree.1//' .TH DTREE l .SH NAME Originally written at St. Olaf College, Northfield, MN. //E*O*F dtree.1// echo x - dtree.c sed 's/^ //' > "dtree.c" << '//E*O*F dtree.c//' /* * DTREE - Print the tree structure of a directory return(ptr); } //E*O*F dtree.c// echo Possible errors detected by \'wc\' [hopefully none]: temp=/tmp/shar$$ trap "rm -f $temp; exit" 0 1 2 3 15 cat > $temp <<\!!! 87 455 2507 dtree.1 831 3183 21040 dtree.c 918 3638 23547 total !!! wc dtree.1 dtree.c | sed 's=[^ ]*/==' | diff -b $temp - exit 0 ------------------------------------------------------------------------------- slrn slrnpull -d /var/spool/slrnpull -h news.muc. de slrn -f /var/spool/slrn/newsgroups -d # gets descriptions ------------------------------------------------------------------------------- sockstat -4l see which daemons are listening for connection requests on IPv4 ------------------------------------------------------------------------------- sort sort -n -t: +3 -4 /etc/passwd sort /etc/passwd by group no. sort -t : -k 3,1 -n /etc/master.passwd ------------------------------------------------------------------------------- sftp sftp -o User=myname myhost.mydomain ------------------------------------------------------------------------------- ssh For non Unix: http://the.earth.li/~sgtatham/putty/0.54/puttydoc.txt http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html PuTTY is a free SSH, Telnet and Rlogin client for 32-bit Windows systems. ------------------------------------------------------------------------------- ssh-keygen ssh-keygen -N "" -f /etc/ssh/ssh_host_key # done when sys installed ? ssh-keygen -d -N "" -f /etc/ssh/ssh_host_dsa_key # done when sys installed ? ssh-keygen -t rsa # only run once Generating public/private rsa key pair. Enter file in which to save the key (/usr/home/jhs/.ssh/id_rsa): /usr/home/jhs/.ssh/id_rsa already exists. Overwrite (y/n)? y Enter passphrase (empty for no passphrase): Enter same passphrase again: Your identification has been saved in /usr/home/jhs/.ssh/id_rsa. Your public key has been saved in /usr/home/jhs/.ssh/id_rsa.pub. The key fingerprint is: ... jhs@ After changing domain name string in RSA1 ssh_host_key sshd failed to start, complaining: cipher_encrypt: bad plaintext length 339 This fixed it: /usr/bin/ssh-keygen -t rsa1 -N "" -f /etc/ssh/ssh_host_key ssh-keygen -t dsa;cat ~/.ssh/id_dsa.pub | \ ssh remote_host "cat >> .ssh/authorized_keys" cd .ssh chmod 400 id_rsa id_dsa # Secret, keep local cat id_rsa.pub >> /host/remote/usr/home/`whoami`/.ssh/authorized_keys ssh-keygen -t rsa ------------------------------------------------------------------------------- sysctl sysctl -a -d sysctl -w net.inet.ip.forwarding=1 sysctl hw.acpi.battery.life # percent remaining sysctl hw.acpi.battery.time # remaining minutes sysctl hw.acpi.battery.state # status sysctl hw.acpi.battery.info_expire # seconds refreshed ------------------------------------------------------------------------------- swapon Host mini with 4.11 & swapinfo Device 1K-blocks Used Avail Capacity Type /dev/ad0s1b 32640 6340 26300 19% Interleaved fails on cd /usr/src/lib/libc_r ; make with swap_pager: out of swap space swap_pager_getswapspace: failed /kernel: pid 94059 (ld), uid 0, was killed: out of swap space so cd /tmp ; dd if=/dev/zero count=200000 bs=10k of=SWAP ; chmod 600 SWAP if [ "$rel" = "4" ]; then vnconfig /dev/vn0c SWAP; swapon /dev/vn0c else # }{ 5 or 6 mdconfig -a -t vnode -f /var/SWAP; swapon /dev/md0 fi # } openoffice.org-2.0-devel Makefile says 2G to build so: bs=100k count=20000 swapoff /dev/md0 mdconfig -d -u 0 ------------------------------------------------------------------------------- tail tail for winshit http://www.baremetalsoft.com/baretail/ ------------------------------------------------------------------------------- tar To produce a list of things to write onto succesive full 650M CDROMs: script cd big find . -type f | sort > ../list tar -c -f /dev/null -v -L 630000 -T ../list # note cannot use "-T -" as tar reads prompt for next media from pipe. cd .. ; vi typescript ------------------------------------------------------------------------------- tcpdump *before* you connect to MUC the next time start tcpdump like this tcpdump -vv -i isp -w [filename] this will log the PPP negotiation stuff to [filename]. After you're connected you can kill the tcpdump (I don't want to see all the traffic, just the PPP negotiation stuff). Then do ``tcpdump -r [filename] > [someotherfilename]'' ------------------------------------------------------------------------------- tiffrotate Only does a single sheet, truncates multi page files, so use tiffsplit before, & tiffcp after. ------------------------------------------------------------------------------- truss truss -p | grep "Resource temp" ------------------------------------------------------------------------------- vi !}sort sort paragraph !)rev reverse sentence nvi You can open up a new split-screen window in (n)vi with :N or :E and then use ^w to switch between the two. ------------------------------------------------------------------------------- vidcontrol vidcontrol -f 8x8 iso-8x8.fnt VGA_80x60 < /dev/ttyv3 ------------------------------------------------------------------------------- vmstat -i Report on the number of interrupts taken by each device since system startup. handy for isa card analysis ------------------------------------------------------------------------------- vnconfig vnconfig - s labels /dev/vn... before mounting a file that has no FreeBSD label on that partition ------------------------------------------------------------------------------- whois whois -r np17 # but not whois np17 whois berklix.com whois -h whois.networksolutions.com \!BSD108-HST whois forcefive.de whois -h whois.totalregistrations.com berklix.com ------------------------------------------------------------------------------- webcams /usr/ports/devel/linux-kmod-compat ------------------------------------------------------------------------------- WORD editors/staroffice textproc/catdoc textproc/word2x # from MS Word to text, HTML or LaTeX ------------------------------------------------------------------------------- latex gary used lyx see also xdvi ------------------------------------------------------------------------------- Re. /usr/ports/print/latex by Andreas Klemm: Wesentlich umfassender und bedienungsfreundlicher ist teTeX von Thomas Esser. ------------------------------------------------------------------------------- xmbmon -A -clvc darkgreen -cltcs purple # the colours are cos the defaults are unreadable. CPU temperatures & fan speeds ------------------------------------------------------------------------------- xmms Play List Editor icons are too small in 1600x1200 so here: Misc URL All Inv Sel Sort List New List Dir Crop Sel Zero File Inf Save List File + File - Sel All Misc Opt Load List ------------------------------------------------------------------------------- xsane net:rain:mustek:/dev/pass1 # Works setenv SANE_DEFAULT_DEVICE net:rain:mustek:/dev/pass1 # Fails Often need to reset 20.95 cm x 29.65 cm ------------------------------------------------------------------------------- xset b off turns bell off in X (useful for vi) similar to kbdcontrol -b off -b visual or Hack the sysbeep() function in sys/i386/isa/clock.c xset fp+ /usr/X11R6/lib/X11/fonts/mozilla ; xset fp rehash xset dpms force standby # turn off the backlight ------------------------------------------------------------------------------- xxgdb file ~/public_html/src/bsd/jhs/bin/public/mailname/mailname set args -N * ------------------------------------------------------------------------------- X -query 10.250.1.15 ------------------------------------------------------------------------------- xauth As screen owner: xauth extract /tmp/`whoami`.xauth.tmp `hostname`:0.0 ; \ chmod a+r /tmp/`whoami`.xauth.tmp; ( sleep 180;rm /tmp/`whoami`.xauth.tmp ) & rlogin localhost -l `whoami`-hv rlogin localhost -l `whoami`-u As limited user: xauth merge /tmp/`whoami | sed -e s/-u//`.xauth.tmp; \ xauth merge /tmp/`whoami | sed -e s/-hv//`.xauth.tmp; \ setenv DISPLAY `hostname`:0.0 ; firefox & # or exmh # investigate Xnest later: Matthias B ref'd me to: # http://pestilenz.org/cgi-bin/blosxom.cgi/2005/11/16#Xsandbox ------------------------------------------------------------------------------- xine ports/multimedia/xine 64K sound saves 200M, better used on video quality rip 20 mins, transcode 3 hrs ---------- * Make sure you've enough shared memory, the xine FAQ * * advises to have the following sysctl settings: * * kern.ipc.shmmax=67108864 * * kern.ipc.shmall=32768 * * To suppress many xitk warnings, please put following * * setting in ~/.xitkrc. * * feature.shm = 0 * ------------------------------------------------------------------------------- xv make a picture your X background with xv -root -max -quit bsdback.jpg ------------------------------------------------------------------------------- > DOes anyone know how to setup two graphic boards on the same computer, > running different apps on the two displays ? I didn't find any relevant > information in the XF86 doc, so if someone has some experience or doc > concerning that kind of things... # X :0.0 & # fvwm -display 0:0.0& # X :1.0 & # fvwm -display 0:1.0& ------------------------------------------------------------------------------- cd /usr/ports; make search key=netboot ------------------------------------------------------------------------------- To build /usr/libexec/ld.so for netscape: cd /usr/src/lib/compat ; make -DRELEASEDIR install netscape /usr/libexec/ld.so: warning: /usr/lib/libg++.so.4: minor version -1 older than expected 0, using it anyway ld.so failed: bad magic number in "/usr/lib/libg++.so.4" echo ldconfig as per /etc/rc or simply reboot to reindex the libraries ------------------------------------------------------------------------------- unrm see http://www.porcupine.org/forensics/tct.html The Coroner's Toolkit (TCT) /usr4/ftp/public/sites/www.porcupine.org/forensics/ ------------------------------------------------------------------------------- ptys number open: fstat | awk '{print $8}' | egrep 'tty[pqrsPQRS]' | sort -u | wc -l ------------------------------------------------------------------------------- boot0cfg(8) to repair Master Boot Record ------------------------------------------------------------------------------- galactic build: mergemaster -p make buildworld make kernel KERNCONF=your_kernel_conf_name reboot new kernel in single-user mode fsck -p mount -a -t ufs cd /usr/src make installworld mergemaster -i exit (to multi-user mode) ------------------------------------------------------------------------------- ZIP Drive http://www.freebsd.org/doc/en_US.ISO8859-1/articles/zip-drive/x88.html mount_msdos /dev/afd0s4 /mnt ------------------------------------------------------------------------------- gnats on freebsd.org: Use a subject like: Re: 50736: ports/mail/mailman Or Re: ports/50736: ports/mail/mailman Not like Re: ports/mail/mailman else it creates a new PR. ------------------------------------------------------------------------------- pdf doc viewing notes, Canon Digital camera IXUS II sold in UK is known as PowerShot SD100 in USA. Their web says: "Please use Adobe Reader 6.0 or later to browse this PDF file. If you use Adobe Acrobat Reader 5.x, a digital watermark "COPY" will appear behind the text on your monitor. Or if you use Adobe Acrobat Reader 4.x or earlier, it will be impossible to open the PDF file. - When printing this file, the digital watermark "COPY" will be printed on each page." FreeBSD-5.3-release on amd64 /usr/ports/graphics/kdegraphics3 kpdf wants dcopserver, then doesnt display properly /usr/ports/graphics/gpdf Does Not display properly. /usr/ports/print/acroread only for i386 alpha, and you are running amd64 /usr/ports/print/acroread5 only for i386 alpha, and you are running amd64 /usr/ports/print/acrobatviewer On amd64, build reports: jre-1.1.8 is only for i386 /usr/ports/print/ghostview Does Not display properly. /usr/ports/print/gv DISPLAYS OK (albeit with "Copy" faintly behind. /usr/ports/print/mgv Cant even open file /usr/ports/print/p5-Text-PDF A PDF manipulation module pdfbklt.plx Fails reading. /usr/ports/textproc/pdftohtml Error: PDF version 1.5 -- xpdf supports version 1.4 (continuing anyway) Error: Copying of text from this document is not allowed. /usr/ports/print/pdftk A simple tool for doing everyday things with PDF document Bus errors in stage2 ------------------------------------------------------------------------------- camera file names ( maybe should be upper case): "Canon Digital Ixus II" generates names such as img_0007.jpg "Fuji Finepix 2800 Zoom" generates names such as dscf0024.jpg ----- DVD_RAM: Type 1 - in a sealed caddy Type 2 - in an open caddy --- USB Stick partitioning: fdisk -u da0 ******* Working on device /dev/da0 ******* parameters extracted from in-core disklabel are: cylinders=488 heads=32 sectors/track=32 (1024 blks/cyl) parameters to be used for BIOS calculations are: cylinders=488 heads=32 sectors/track=32 (1024 blks/cyl) Do you want to change our idea of what BIOS thinks ? [n] Media sector size is 512 Warning: BIOS sector numbering starts with sector 1 Information from DOS bootblock is: The data for partition 1 is: sysid 6,(Primary 'big' DOS (> 32MB)) start 32, size 499680 (243 Meg), flag 80 (active) beg: cyl 0/ head 1/ sector 1; end: cyl 487/ head 31/ sector 32 Do you want to change it? [n] y Supply a decimal value for "sysid (165=FreeBSD)" [6] 6 Supply a decimal value for "start" [32] Supply a decimal value for "size" [499680] 262144 Explicitly specify beg/end address ? [n] sysid 6,(Primary 'big' DOS (> 32MB)) start 32, size 262144 (128 Meg), flag 80 (active) beg: cyl 0/ head 1/ sector 1; end: cyl 256/ head 0/ sector 32 Are we happy with this entry? [n] Supply a decimal value for "sysid (165=FreeBSD)" [6] 6 Supply a decimal value for "start" [32] Supply a decimal value for "size" [262144] 262143 fdisk: WARNING: partition does not end on a cylinder boundary fdisk: WARNING: this may confuse the BIOS or some operating systems Correct this automatically? [n] Explicitly specify beg/end address ? [n] sysid 6,(Primary 'big' DOS (> 32MB)) start 32, size 262143 (127 Meg), flag 80 (active) beg: cyl 0/ head 1/ sector 1; end: cyl 256/ head 0/ sector 31 Are we happy with this entry? [n] Supply a decimal value for "sysid (165=FreeBSD)" [6] Supply a decimal value for "start" [32] Supply a decimal value for "size" [262143] 262144 Explicitly specify beg/end address ? [n] sysid 6,(Primary 'big' DOS (> 32MB)) start 32, size 262144 (128 Meg), flag 80 (active) beg: cyl 0/ head 1/ sector 1; end: cyl 256/ head 0/ sector 32 Are we happy with this entry? [n] y The data for partition 2 is: Do you want to change it? [n] y Supply a decimal value for "sysid (165=FreeBSD)" [0] 165 Supply a decimal value for "start" [0] 262145 Supply a decimal value for "size" [0] 237536 fdisk: WARNING: partition does not start on a head boundary fdisk: WARNING: partition does not end on a cylinder boundary fdisk: WARNING: this may confuse the BIOS or some operating systems Correct this automatically? [n] Explicitly specify beg/end address ? [n] sysid 165,(FreeBSD/NetBSD/386BSD) start 262145, size 237536 (115 Meg), flag 0 beg: cyl 256/ head 0/ sector 2; end: cyl 487/ head 31/ sector 1 Are we happy with this entry? [n] Supply a decimal value for "sysid (165=FreeBSD)" [165] Supply a decimal value for "start" [262145] 262144 Supply a decimal value for "size" [237536] Explicitly specify beg/end address ? [n] sysid 165,(FreeBSD/NetBSD/386BSD) start 262144, size 237536 (115 Meg), flag 0 beg: cyl 256/ head 0/ sector 1; end: cyl 487/ head 30/ sector 32 Are we happy with this entry? [n] y The data for partition 3 is: Do you want to change it? [n] The data for partition 4 is: Do you want to change it? [n] Partition 1 is marked active Do you want to change the active partition? [n] We haven't changed the partition table yet. This is your last chance. parameters extracted from in-core disklabel are: cylinders=488 heads=32 sectors/track=32 (1024 blks/cyl) parameters to be used for BIOS calculations are: cylinders=488 heads=32 sectors/track=32 (1024 blks/cyl) Information from DOS bootblock is: 1: sysid 6,(Primary 'big' DOS (> 32MB)) start 32, size 262144 (128 Meg), flag 80 (active) beg: cyl 0/ head 1/ sector 1; end: cyl 256/ head 0/ sector 32 2: sysid 165,(FreeBSD/NetBSD/386BSD) start 262144, size 237536 (115 Meg), flag 0 beg: cyl 256/ head 0/ sector 1; end: cyl 487/ head 30/ sector 32 3: 4: Should we write new partition table? [n] y disklabel -w -r da0s2 auto ; disklabel -e da0s2 newfs /dev/da0s2 echo '/dev/da0s2a /stick.bsd ufs rw,noauto 0 0' >> /etc/fstab fsck -y /dev/da0s2a fsck -y -t msdos /dev/da0s1 mount /stick.bsd echo unproven: echo 'drive u: file="/dev/da0s1"' >> /etc/mtools.conf mformat -v stacey_juli -t 257 -h 31 -n 32 -F -H 32 u: # -v is 11 chars max, stacey is first for if lost & finder looks in phone book # -H number of hidden sectors mdir u: echo '/dev/da0s1 /stick.dos msdos rw,noauto 0 0' >> /etc/fstab ------------------------------------------------------------------------------- Win-XP: WINDOWS/system/setup.inf: For XP similarity to /etc/rc, see WINDOWS/inf/biosinfo.inf: Hints on hardware anomalies I386/BIOSINFO.INF ------------------------------------------------------------------------------- # next to try: date; burncd -s max -f /dev/acd0 audio *.wav fixate;date # later: -d ------------------------------------------------------------------------------- OLD to scrap or merge HOW TO BE ABLE TO NFS MOUNT /usr/src, & MAKE ON MULTIPLE HOSTS. How to compile from nfs mounted /usr/src on multiple hosts. My Setup: My hosts are called: `src_master' & `src_client_1' & ``src_client_2', with nfs cross mounts, such that src_client_1:/host/src_master/___ == src_master:/___ src_client_1:/host/src_master/usr/___ == src_master:/usr/___ src_client_1:/host/src_master/usr1/___ == src_master:/usr1/___ src_client_2:/host/src_master/___ == src_master:/___ src_client_2:/host/src_master/usr/___ == src_master:/usr/___ src_client_2:/host/src_master/usr1/___ == src_master:/usr1/___ /usr/src resides on host `src_master', which has a symbolic link: /usr/src --> ../usr1/src. hosts src_client_1 & src_client_2 have symbolic links: /usr/src --> /host/src_master/usr/src Each of src_master & src_client_1 & src_client_2 have their own /usr/obj with: /usr/obj/host /usr/obj/host/src_client_1 --> .. /usr/obj/host/src_client_2 --> .. /usr/obj/host/src_master --> .. The purpose of the /host/ component, is so that whichever host first runs make world, the obj dirs are local, & also under /usr/obj, (& not under /usr/obj/host/src_master when src_client_1 or src_client_2 runs make world). src/Makefile requires setenv NOCLEANDIR so that on `src_client_1', `make world' will do nothing when calling `cleandir' This might be advisable, as it will save some time: setenv NOOBJ so that when this src_client_1 % make world results in this: Rebuilding /usr/lib cd /usr/src/gnu/lib && make depend all install clean obj the make obj does nothing, & does not result in /host/src_master/usr1/src/gnu/lib/libdialog -> /usr/obj/host/src_master/usr1/src/gnu/lib/libdialog My /usr/src/sys now supports all this too - thought the patches will take a while to work in to public src. --------------------- What is the difference between Safe Mode and Default Mode? grep -A11 'bootsafekey @' /boot/beastie.4th ------------------------------------------------------------------------------- mplayer Sample from [email ?] mplayer -tv driver=bsdbt848:input=1:channels=SE14-BBC,SE9-3sat,\ E10-ARD,E8-ZDF,SE4-arte,S22-WDR tv://) mplayer /dev/acd0 Works on commercial Bach DVD, (single prog.) Works on jes@ made global warming dvd [from tv?], (single prog.) Fails on commercial BBC B.... A.... DVD, (intro + 6 progs) Could not initialize video filters (-vf) or video output (-vo) Log of trials with B.... A.... DVD :- chmod 666 /dev/acd0 mplayer /dev/acd0 #pic. fractured, complains Encrypted VOB file! mplayer dvd:// /dev/acd0 { Plays intro, pic & sound OK, Then complains Encrypted VOB, starts new frame & repeats intro with fragmented pics. } mplayer dvd://5-7 # plays inc sound mplayer dvd:// -dvd-device /dev/acd0 # plays intro inc sound mplayer dvd://2 -dvd-device /dev/acd0 # plays prog2 inc sound dvdbackup -M -i /dev/acd0 -o b...._a.... /usr/ports/sysutils/dvdbackup Copies dvd content, but probably not title. cd b...._a.... ; echo B* | sed -e "s/ /_/g" B....A...._____________________ ls B....A....* # VIDEO_TS ls /cdrom # audio_ts video_ts ls /cdrom/audio_ts # empty So dvdbackup discards empty dirs, & maps to upper case. mv B* cp_by_dvdbackup ; cd cp_by_dvdbackup ls # ensure it shows sub dir VIDEO_TS mkisofs -r -J -o ../b...._a.....iso . # NOT mkisofs -r -J -o ../b...._a.....iso VIDEO_TS # (which promotes *.vob into top dir. of .iso ). mplayer b...._a.....iso # plays, no sound, # loops on intro track. Shows Spruce Technologies before BBC. mplayer dvd:// b...._a.....iso # plays, inc. sound mdconfig -a -t vnode -f *.iso chmod 666 /dev/md0 mplayer /dev/md0 # plays no sound, looping on intro. Announces MPEG-PS file format detected. MPEG: No audio stream found -> no sound. Audio: no sound Loops, Playing intro silently, with good video. Never gets to offer which programme, unlike Elsa. mplayer dvd:// /dev/md0 # plays no sound, looping on intro. # tries to access DVD if in. mplayer dvd:// -dvd-device /dev/md0 # plays intro with sound, looping cd VIDEO_TS mplayer VTS_04_1.VOB # plays OK, inc. sound. chmod 666 /dev/acd0; xine VTS_04_1.VOB # plays video & sound xine b...._a.....iso # No demuxer available. xine /dev/acd0 # No demuxer available. xine /dev/md0 # mplayer -menu /dev/md0 # loops mplayer -menu-startup /dev/md0 # 1st then 2nd session, but no sound gmplayer -menu-startup -osdlevel 3 /dev/md0 does progress into 1st half hour session, but no sound, flashes up many new screens to cursor place. mplayer dvd://1 -dvd-device cp_by_dvdbackup # Plays intro inc sound. mplayer dvd://2 -dvd-device cp_by_dvdbackup # Plays 1st of 6 episodes. mplayer dvd://3-7 -dvd-device cp_by_dvdbackup # Plays 6th episode. mount /cdrom; chmod 666 /dev/acd0 mplayer dvd://3-7 -dvd-device /cdrom Over NFS (data on host=laps, screen_host=fire), Works with sound initialy, then sound stops after half a minute & on the xterm invoking mplayer, get err: Too many video packets in the buffer: Does Not need access to /dev/acd0. With dvd & screen all on host=laps, work ok, no sound failure. mplayer dvd://2 /dev/md0 # plays, over nfs but sound slow then fails. foreach i ( 1 2 3 4 5 6 7 ) echo "To Vob From hard disc." # One large .vob per prog. mplayer dvd://$i -dvd-device cp_by_dvdbackup \ -dumpstream -dumpfile vob_from_mplayer/$i.vob echo "To Avi From hard disc." # 30 sec. for intro. prog. mencoder dvd://$i -dvd-device cp_by_dvdbackup \ -ovc lavc -oac lavc -of avi -o avi_from_mencoder/$i.avi echo "To Avi From dvd disc." # 45 sec. for intro. prog. # DVD drive runs continuously, no wearing speed changes. mencoder dvd://$i -dvd-device /dev/acd0 \ -ovc lavc -oac lavc -of avi -o avi_from_mencoder/$i.avi file: RIFF (little-endian) data, AVI, 720 x 576, 25.00 fps, video:, audio: (stereo, 48000 Hz) These .avi are only 250M & picture quality is too low. 7436598 1.avi 260989622 2.avi 265559142 3.avi 257757022 4.avi 268985852 5.avi 238040628 6.avi 241576714 7.avi end # works, mplayer later can play both .vob & .avi acidrip: Running mencoder dvd://6 -dvd-device /dev/acd0 -alang English \ -info srcform="DVD ripped by acidrip.sf.net" -oac \ mp3lame -lameopts abr:br=128 -af volume=4:sc -ovc \ xvid -xvidencopts :bitrate=2521 -vf pp=de,scale=720:-2 \ -o "/usr/home/jhs/xtra/dvd/acidrip//blackadder-6.avi" host=fire Video Source: /dev/acd0 7 progs shown available host=laps Video Source: /dev/md0 Not a valid DVD drive If 2 hosts share a common ~/.acidrip, you cant do 2 rips at once, (but can queue them). transcode: Not tried manually. See also ogle: another player ------------------------------------------------------------------------------- To get a command.com DOS box in MS-XP: Double Click Start, Double Click Run Type 2 x backspace (to get rid of a:), Type command.com Also: Windows\system32 contains cmd.exe --------------------- vmstat -i systat -vm ------------------------------------------------------------------------------- Data capture for eg smtp/pop3 tcpdump, Ethereal, sniffit, snort mailsnarf from the dsniff package tcpdump -w /var/log/mailarchive.dump -s 0 port smtp or port pop3