The basic operation of this program is as follows:
1. Panic. You usually do so anyways, so you might as well get it over with. Just don't do anything stupid. Panic away from your machine. Then relax, and see if the steps below won't help you out.
Ha. I wasn't familiar with scan_ffs, so I googled it. Given what it does, or purports to do, yeah, a first step of "Panic" makes total sense. Reminds me of something which happened early in my career. An older, wiser coworker came by and said, "You won't believe what I almost did. I was installing a new disk on cyclops (our main NFS server), and I almost typed 'newfs /dev/sda' instead of 'newfs /dev/sdb'" (this was on SunOS 4, iirc). Then he went back to his office, hit return a couple times and... he had left "newfs /dev/sda_" sitting there on the command line. Panic ensued. We recovered from backup tapes.
For those who are wondering: The Linux equivalent is “findsuper”, which is from the e2fsprogs package, but the “findsuper” command is not normally built and installed, so when you need it, you will have to download the e2fsprogs source and compile findsuper yourself. An unnecessary pain at the worst possible time, sadly.
sunos4 disk devices were named like xy0a or xd2h or sd1b. the first 2 letters were the controller (xy/xd were different types of xylogics smd controllers, sd scsi), the number was the unit number, and the letter was the partition, with some fairly strong conventions (a=root, b=swap, c=whole disk, d..h=other)
I love man pages. But it took me many years before I realized how easy it is to write man pages for tools that I write (and further, I write in markdown and pandoc happily translates them to troff for me).
A few years ago I learned that one can also add a new section to man. I've added the `eg` section, which I fill with examples that I think will be useful to future me. For example, typing `man eg awk` opens up my man page of examples for awk, which is more pointed.
> They are almost without exception well-written and concise, and the intuition you gain for particular topics as you browse through the man pages is well worth the effort. In contrast, many developers shoot straight to googling the answer for the problem at hand.
Maybe worth the effort if you want to learn about a program in detail, but in practice I often give up reading the manual and use google instead because I just want to know/remind myself the most common use cases. To be fair, there are some man pages that have a great USAGE or EXAMPLES section which meet this purpose.
> If you create and distribute an executable for linux/unix, and you don't create a man page for it, you are committing a crime against humanity.
I agree.
And it's so easy to do! As long as your program has a --help option, creating the manpage simply amounts to calling help2man. Just add this to your makefile:
I remember some old man page (su? sudo?) complaining quite bitterly about the wheel group not sharing its power or something, but can't seem to remember it.
http://man.openbsd.org/scan_ffs