postmaster@nusc.arpa (SMTP MAILER) (12/03/88)
----Mail status follows---- Have been unable to send your mail to <baynes@drum>, will keep trying for a total of three days. At that time your mail will be returned. ----Transcript of message follows---- Date: 1 Dec 88 08:10:00 EST From: <info-unix@BRL.MIL> Subject: INFO-UNIX Digest V6#031 To: "baynes" <baynes@drum> Received: from SEM.BRL.MIL by nusc.arpa with SMTP ; Thu, 1 Dec 88 08:09:16 EST Received: from SEM.BRL.MIL by SEM.brl.MIL id ab04903; 1 Dec 88 3:26 EST Received: from sem.brl.mil by SEM.BRL.MIL id aa04894; 1 Dec 88 2:46 EST Date: Thu, 01 Dec 88 02:46:12 EST From: The Moderator (Mike Muuss) <Info-Unix-Request@BRL.MIL> To: INFO-UNIX@BRL.MIL Reply-To: INFO-UNIX@BRL.MIL Subject: INFO-UNIX Digest V6#031 Message-ID: <8812010246.aa04894@SEM.BRL.MIL> INFO-UNIX Digest Thu, 01 Dec 1988 V6#031 Today's Topics: Adventure shell Troff "grap" question Re: ls -l Re: * Question Re: Info needed on workstations Re: GCOS field System 5.3.1 signal() replacement? signals to running processes Re: How to mimic the terminal driver? Pre-formatted tapes for HP drives A UUCP question SVR3 Manuals Re: GCOS field Re: A UUCP question Re: * Question Re: How to mimic the terminal driver? Re: * Question Re: Adventure shell Re: GCOS field Re: Troff "grap" question Re: Anonymous ftp's Nroff/Troff Floating Displays Re: Pre-formatted tapes for HP drives Re: ls -l Re: * Question Re: ls -l Re: SCCS: how to handle multiple developers/streams Re: ls -l Re: fio library routines ----------------------------------------------------------------- From: Jon Joshua <jjoshua@topaz.rutgers.edu> Subject: Adventure shell Date: 30 Nov 88 06:27:13 GMT Keywords: anyone got it? To: info-unix@sem.brl.mil I heard someone mention a shell called the adventure shell. This shell turned Unix into an adventure game where you could pick up files and drop them elsewhere etc... Does anyone have more info on this shell? Better yet, does anyone have a copy? JOn. -- _____________________________________________________________________________ |o| Jonathan Joshua jjoshua@topaz.rutgers.edu Why not... |o| |o| Nothing better to do |o| |o| Anything is possible, |o| \o| except for skiing through a revolving door. |o| \_ ____/ \ |o| \/ \ _______________________________ ______________________|o| \___ / \/ \/ ----------------------------- From: Erik Ekkel <ekkel@idca.tds.philips.nl> Subject: Troff "grap" question Date: 29 Nov 88 11:44:55 GMT To: info-unix@sem.brl.mil I want to use the troff "grap" preprocessor to plot a graph. The problem is that the input has as x-coordinate weeknumbers. So the range of the x-axis is e.g. 8801:8852, 8901:8952, .......... How can i tell "grap" that there is a gap in the x-axis; that week 8901 is the successor of week 8852 and NOT 8900 ! -- __ / Erik Ekkel, Philips PTDSN (+31 55 433301) /-- __ o / Domain: ekkel@idca.tds.philips.nl /___ _/ (_(_ /( Uucp : ...!mcvax!philapd!ekkel ----------------------------- From: James Logan III <logan@vsedev.vse.com> Subject: Re: ls -l Date: 30 Nov 88 04:01:12 GMT Keywords: ls To: info-unix@sem.brl.mil In article <838@nih-csl.UUCP> ted@nih-csl.UUCP (ted persky) writes: # # When a user enters the command "ls -l" on a directory, a slew of # information is given with such things as last-modified time, # number of links, owner, group, etc. Such data is usually stored # in the inode. My question is this: does the "ls" program need to # open each file, to look at its inode in order to display this # data to standard output? # No, the "inode" is stored in an "inode table" stored near the beginning of a disk partition. It is basically an array of structures containing the information supplied by the stat(2) call (links, mode, UID, GID, etc.) plus a block number map for the file. This block number map consists of 13 block numbers. The first 9 block numbers refer to the first 9 blocks of the file's data. The 10th block number, known as the "single indirect" is the block number of another block on the disk containing more of the file's block numbers. The 11th, known as the "double indirect" is the block number of a disk block containing a list of block numbers that refer to disk blocks that contain more of the file's block numbers. The 12th, know as the "triple indirect" is the block number of a disk block containing a list of block numbers that refer to disk blocks that contain block numbers of disk blocks containing more block numbers of the file's data. Confused? I thought so. Of course, short files would not require all of these block numbers, but the blocks are there if you ever need a large file. (Try a 4 gigabyte file to be exact...) Anyway, the simple answer to your question is: "Yes, Virginia, there IS a Santa Clause." No, Wait... um... oh yeah, the "ls" command simply calls the stat(2) system call for each file you specified and the stat(2) call reads the inode table entry associated with that filename. The "ls" command does NOT read a single byte of the file's data. -Jim -- Jim Logan logan@vsedev.vse.com (703) 892-0002 uucp: ..!uunet!vsedev!logan inet: logan%vsedev.vse.com@uunet.uu.net ----------------------------- From: James Logan III <logan@vsedev.vse.com> Subject: Re: * Question Date: 30 Nov 88 04:27:29 GMT To: info-unix@sem.brl.mil In article <17661@adm.BRL.MIL> wmartin@almsa-1.arpa (Will Martin -- AMXAL-RI) writes: #I have a query about filename generation/wildcard expansion. I have looked #in the man pages and in several UNIX books, and talked about this locally, #but haven't found an explanation. I've tested it on both Sys V (on a Sperry #Unisys) and 4.3 BSD (on a VAX 750). It seems to be a consistent difference #between sh and csh. # #Given the situation where you are trying to redirect output to a directory #in some path structure, where you do have write access, but want to save #time in typing: # #Say my login directory is /usr/wm. I also own a directory in another filesystem: #"/data/save-backups". I am sitting in /usr/wm and want to put some data into #that other directory, but want to avoid typing out "save-backups" all the time. #There is nothing else under /data that begins with "sa". # #So I do this: # #cat foo > /data/sa*/bar or cat foo >> /data/sa*/bar # #Under "sh", no matter whether or not "bar" exists in that destination #directory, this won't work. I get the response: # #sh: /data/sa*/bar: cannot create # #The shell will not expand that "*" to fill out the directory name. I have to #type out the full "/data/save-backups/bar" pathname to get it to work. # Every version of the Bourne shell that I have seen does not interpret the filename expansion characters after a redirection symbol. I believe this is to prevent cat foobar >/data/sa*/bar from expanding into cat foobar >/data/sally/bar /data/sandy/bar which would effectively be the same as cat foobar /data/sandy/bar >/data/sally/bar which was probably not intended. The Korn shell gets this right by expanding the wildcard only if one file matches. If more than one file matches, the wildcard is used literally. -Jim -- Jim Logan logan@vsedev.vse.com (703) 892-0002 uucp: ..!uunet!vsedev!logan inet: logan%vsedev.vse.com@uunet.uu.net ----------------------------- From: "G.Pavlov" <pavlov@hscfvax.harvard.edu> Subject: Re: Info needed on workstations Date: 30 Nov 88 05:20:50 GMT Posted: Wed Nov 30 00:20:50 1988 To: info-unix@sem.brl.mil In article <6060017@hpcupt1.HP.COM>, markd@hpcupt1.HP.COM (Mark Diekhans) writes: > I am considering buying a Unix workstation in the less than $15K department. > So far, the Sun-3s and the IBM PC RT look likely contenders. Does anyone have > any input on these or other UNIX workstations, both hardware and the versions > of UNIX for each? Thanks, How about an HP 9000 Model 340 ? greg pavlov, fstrf, amherst, ny ----------------------------- From: Jean-Pierre Radley <jpr@dasys1.uucp> Subject: Re: GCOS field Date: 30 Nov 88 04:03:40 GMT To: info-unix@sem.brl.mil In article <1257@vsedev.VSE.COM> logan@vsedev.VSE.COM (James Logan III) writes: >Does anyone know what GCOS really stands for and where it came from? In my flavor of unix, that's described as the "Comment" field. In volume 1 of the Unix Programmer's Manual, the old green books, that field was listed as GCOS job number, box number, optional GCOS user-id and the manual page went on to state: The GCOS field is used only when communicating with that system, and in other installations can contain any desired information. Elsewhere in the old green books, I get the implicit, not explicit, information that GCOS referred to a typesetting system at Murray Hill at the time that Osanna & Co. were inventing troff. -- Jean-Pierre Radley Honi soit jpr@dasys1.UUCP New York, New York qui mal ...!hombre!jpradley!jpr CIS: 76120,1341 y pense ...!hombre!trigere!jpr ----------------------------- From: Timothy Reed <treed@dasys1.uucp> Subject: System 5.3.1 signal() replacement? Date: 30 Nov 88 04:28:17 GMT To: info-unix@sem.brl.mil I don't have access to a 5.3.1 system, but I understand that signal() has been replaced by a new set of signal handlers. Could someone kindly mail me a man page (I think that the replacement is sigset()?) or a brief summary of snytax and usage (and signals!) - doing so will make my life much easier!!! Thanks! Timothy Reed -- NAME : Timothy Reed PHONE: 7188527454 UUCP : ..!cmcl2!phri!dasys1!treed || ..!uunet!dasys1!treed MAIL : 300 Union St^MBkyn, NY^M11231 ----------------------------- From: Jonathan Sweedler <cjosta@taux01.uucp> Subject: signals to running processes Date: 30 Nov 88 07:01:28 GMT To: info-unix@sem.brl.mil I have a program that takes a long time to finish running. From time to time (sometimes never, sometimes more frequently) I would like to find out the current status. The way I accomplish this is to send one of the user defined signals (SIGUSR1 - no. 30) to the process. The process has a signal handler that catches this signal and writes out the current state (number of loops done, how long it has been running, when it will finish, etc.). This all works fine but only I (the owner of the process) can send the signal. If my boss, for example, wants to look at the status of the process, he can't. My questions are these: 1) Is there any way for someone who is not the owner of a process to send the process a signal? 2) Or, is there another way for a random user to cause a program to asynchronously print out a status report (or perform some action) once it has started running? I know I can have the program print out a status report every x minutes/hours/loops/whatever, but I don't want this. I want the report to be printed out only when specified to do so. I could also probably (haven't done this yet) write a shell script that would send the signal and is setuid to me but then if different people run the program (other than me), there must be different shell scripts that are setuid to each person who might run the program. For example, if either user A or user B might run the program, but it is user C that wants the progress report, then there must be a shell script setuid'ed to A and one setuid'ed to B. Is there a cleaner approach? -- Jonathan Sweedler === National Semiconductor Israel UUCP: ...!{amdahl,hplabs,decwrl}!nsc!taux01!cjosta Domain: cjosta@taux01.nsc.com ----------------------------- From: The Demented Teddy Bear <dieter@titan.nmt.edu> Subject: Re: How to mimic the terminal driver? Date: 30 Nov 88 10:47:39 GMT Sender: dieter@nmtsun.nmt.edu To: info-unix@sem.brl.mil In article <35@umvlsi.ECS.UMASS.EDU>, vishwana@umvlsi (Chidambaram Vishwanath) writes: > > I have taken upon myself the following task, viz.,: I want to add > an extra feature to the C-shell whereby I can recall earlier commands > by pressing an arrow-key. By far the easiest solution to this problem is to use "ile", which was posted to comp.unix.wizards on July 7, 1988 by bpendlet@esunix.uucp. (Bob Pendleton, message id 907@esunix.uucp, to be exact). It fits between the user and his program by grabbing a pty and looking at everything that goes by. There are three problems with this package that I'm aware of. 1) Your version of unix must understand the concept of pty. This seems to be fairly common these days, so it isn't too much of a problem. 2) It grabs a pty, but doesn't update /etc/utmp, which upsets "talk" and other programs that do a getlogin (). This is pretty easy to fix (I just finished doing that about 4 hours ago, you see). 3) To keep things from getting real confused, the tty never echoes (i.e., the child's end doesn't echo), but the pty does. Therefore, there's no way for ile to know that the child would like echoing turned off. Translation: passwords echo. I haven't figured out a nice way around this yet. 4) There's no clear concept of "current directory". Since this would require something of a Know-What-I-Mean function, there's not much that can be done about it. Some advantages: 1) Ile notices when the child puts the tty into raw mode, and gets out of the way. Things like Emacs still work. 2) You now have an Emacs-like user interface. Things like ^A, ^E, ^T ESC-u, etc, all work. You can change the default key bindings to whatever you prefer. Characters insert by default. 3) File name completion exists, but only on absolute paths (start with a / or ~). I haven't figured out how to get an escape through to the shell for its completion yet, assuming it's possible. 4) *All* line-oriented programs suddenly have history, with a nice line editing capability. Ile maintains its own history list (accessed via ^P and ^N by default), and doesn't distinguish between what subprocess is reading from the pty. It's real convenient being able to pop up the history list and grab the command line you typed at the wrong program and give it to the right program. You don't need one of those "...relentlessly interactive, icon-based, rodent-infested, dumb-user- friendly, smart-user-crippling systems..."[*] any more. I have the original message (as you probably guessed from the exactness in identification given at the top). The diffs for diddling utmp nicely (cleans up after itself and such) are fairly small, and on their way to the original author. Please note that I will not be at this email address after Dec 12, so either get any requests in to me quickly, or send a note off to Mr. Pendleton. [*] Thanks to Mike Van Pelt for that description. Dieter Muller -- Welcome to the island. You are number six. dieter%nmt@relay.cs.net dieter@jupiter.nmt.edu ----------------------------- From: Pierre Mathieu <mathieu@ists.yorku.ca> Subject: Pre-formatted tapes for HP drives Date: 28 Nov 88 18:35:45 GMT Sender: news@istsists.ca Keywords: tape drive To: info-unix@sem.brl.mil Here are a couple of questions about HP tape drives. We have an HP 9000 series 350 system running HP-UX 6.2 with an HP 9144A tape drive. Question 1) Is it possible to load tapes into this drive that are not pre-formatted and format them from HP-UX? I have tried to use (non-HP) unformatted tapes in this drive but it just went into spasms and locked up totally refusing to use these tapes (which are in every way identical to HP's except that they are not pre-formatted). Question 2) If it is not possible, then does anybody know if other companies than HP make these pre-formatted tapes? We found that at twice the price of the other tapes out there, HP prices were a little excessive. :-) Thanks in advance for any help, Pierre Mathieu mathieu@ists.yorku.ca Institute for Space and Terrestrial Science mathieu@yunexus.yorku.ca Center for Research in Exp. Space Science York University, Ontario, Canada. ----------------------------- From: Mario Dorion <mdorion@cmtl01.uucp> Subject: A UUCP question Date: 29 Nov 88 19:23:26 GMT Keywords: 'ALARM' messages To: info-unix@sem.brl.mil Hi! I've got a UUCP problem. There's a uucp link (through standard modems) between my site (X02) and site cmtl01. This link has been used for a few months now for E-mail and file transfering without any problems. For a few weeks, cmtl01 have been giving me a news feed. Since then our commu- nications have been failing with depressing regularity. A (very) good number of our sessions end with *alarms* messages. Since I really have no ideas of what these messages mean I really don't know where to look! Any suggestions??? Here's a few lines from the uucico log and the uucp log. I am using HDP's UUCP with a system V system. *************************** uucico log *************************************** pkgetpack: Connodata=1 rec h->cntl 37777777602 send 40 pkgetpack: Connodata=1 rec h->cntl 37777777612 alarm 1 alarm 2 send 40 alarm 3 send 40 alarm 4 send 40 alarm 5 send 40 alarm 6 send 40 alarm 7 send 40 alarm 8 send 40 alarm 9 send 40 alarm 10 send 40 alarm 11 send 40 tries = 10 send 10 send 10 r short 2 want 3 rcount = 0 xcount = 0 cntrl - -1 send OO 0,imsg >exit code -1 Conversation Complete: Status FAILED **************************** uucp log ************************************ TM_cnt: 1 tm_name: /usr/spool/uucp/cmtl01/TM.10495.000 uucp cmtl01 (11/29-13:10:36,10495,0) FAILED (LOGIN FAILED) uucp cmtl01 (11/29-13:11:29,10495,0) FAILED (LOGIN FAILED) uucp cmtl01 (11/29-13:12:22,10495,0) FAILED (LOGIN FAILED) uucp cmtl01 (11/29-13:12:57,10495,0) SUCCEEDED (call to cmtl01 ) uucp cmtl01 (11/29-13:12:59,10495,0) OK (startup) uucp cmtl01 (11/29-13:13:00,10495,0) REMOTE REQUESTED (cmtl01!D.cmtl07d72574 --> X02!D.cmtl07d72574 (news)) news cmtl01 (11/29-13:16:03,10495,1) IN SEND/SLAVE MODE (INPUT FAILURE) news cmtl01 (11/29-13:16:03,10495,1) FAILED (conversation complete) uucp cmtl01 (11/29-13:25:58,10557,0) FAILED (LOGIN FAILED) uucp cmtl01 (11/29-13:26:47,10557,0) CAUGHT (SIGNAL 15) -- Mario Dorion | E-mail: mdorion@X02.UUCP XIOS Systems | ...uunet!attcan!cmtl01!X02!mdorion Montreal, Canada | 1 (514) 744-3410 | No thanks, no penguin, I already got one! ----------------------------- From: John Gayman <john@wa3wbu.uucp> Subject: SVR3 Manuals Date: 30 Nov 88 03:38:15 GMT To: info-unix@sem.brl.mil I recall seeing an advertisement a few months back from an outfit like Sams, Hayden, etc. offering a set of manuals for SVR3 much like those that are out for SVR2. Would anyone have a telephone number and or title/ISDN numbers for these ? I beleive it was about 3-4 books. Thanks. John -- John Gayman, WA3WBU | UUCP: uunet!wa3wbu!john 1869 Valley Rd. | ARPA: john@wa3wbu.uu.net Marysville, PA 17053 | Packet: WA3WBU @ AK3P ----------------------------- From: pim@mrevox.uucp Subject: Re: GCOS field Date: 30 Nov 88 14:46:00 GMT Nf-ID: #R:dasys1:-799600:mrevox:4400001:000:351 Nf-From: mrevox!pim Nov 30 09:46:00 1988 To: info-unix@sem.brl.mil Someone just the other day saw the GCOS(GECOS) field being prompted for and remarked that he hadn't seen that name for a while. He said that it stood for: General Electric Computer Operating System or General Electric Comprehensive Operating System It seems far fetched, but interesting. Paul MacMurdo pim@mrevox.bellcore.com ...!bcr!mrevox!pim ----------------------------- From: pim@mrevox.uucp Subject: Re: A UUCP question Date: 30 Nov 88 14:53:00 GMT Nf-ID: #R:cmtl01:-13700:mrevox:4400002:000:271 Nf-From: mrevox!pim Nov 30 09:53:00 1988 To: info-unix@sem.brl.mil We used to have the same problem when passing through a DATAKIT node. The problem was resolved when XON was shut off the line set up for UUCP. Paul MacMurdo pim@mrevox.bellcore.com Bellcore ...!bcr!mrevox!pim MRE 1C-343 435 South Street Morristown NJ 07960-1961 ----------------------------- From: "Richard A. O'Keefe" <ok@quintus.uucp> Subject: Re: * Question Date: 30 Nov 88 11:17:51 GMT Sender: news@quintus.uucp To: info-unix@sem.brl.mil In article <17661@adm.BRL.MIL> wmartin@almsa-1.arpa (Will Martin -- AMXAL-RI) writes: >Under "csh", if "bar" doesn't exist, I get: "/data/sa*/bar: No match", >but, if "bar" DOES exist, and I do either: > >cat foo > /data/sa*/bar or cat foo >> /data/sa*/bar > >it will work OK! So "csh" expands the wildcard * correctly in this case. > >And, if "csh" lets this work >as shown, why does it NOT work when creating the file initially? When you give a wildcard pattern in Csh, there has to be at least one thing in the file system which matches the complete pattern. Suppose you have an empty directory /data/savewhatsit/ and no other directories matching /data/sa* . Where then is there anything that matches the **whole** pattern /data/sa*/bar ? If you just want to save yourself a lot of typing, use a shell variable: Csh: set sa=/data/sa* echo works first time >$sa/bar Sh: sa=`echo /data/sa*` echo works first time >$sa/bar Your message was /usr/spool/news/comp/unix/questions/7149 here. In the Bourne shell, I did $ NEWS=/usr/spool/news $ cd $NEWS/comp/unix $ echo que*/7149 $ echo $NEWS/co*/un*/que*/7149 and both echos worked. This was on a Sequent, and the test worked in both the "att" and the "ucb" universes. For some real fun, I went to my home directory and made a subdirectory zabbo containing a file fred. $ echo trouble >zab*/fred zab*/fred: cannot create $ x=zab*/fred $ echo $x zabbo/fred $ echo real trouble >$x zab*/fred: cannot create Let's get this last one out of the way first. $ echo "$x" zab*/fred We see from this that when a variable is assigned a value, that value is not wild-card expanded ("globbed"). But if you use the value of the variable later in a context where globbing is done, the value will be globbed then. That's why I wrote sa=`echo /data/sa*` above. What about ">zab*/fred"? Why didn't that work? Well, you have to read the Sh manual page with extreme attention to detail. Several sorts of "evaluation" happen to a command line. Command SUBSTITUTION `command` is called and the output substituted Parameter SUBSTITUTION $thingies are replaced by their values File Name GENERATION "globbing", "wild-cards". The manual page says clearly that this happens after command and parameter substitution and blank interpretation. Now when we come to input/output redirection, we are told about <word >word >>word and so on that "SUBSTITUTION" happens to the word before it is used. That's *all* that happens; file name generation (globbing, wild-card processing) is not done, and blank interpretation is not done either. $ y="BIG trouble" $ echo $y >$y $ ls BIG trouble fred $ ls $y BIG not found trouble not found $ rm "$y" You can see why the Bourne shell works this way: before command and parameter substitution the "word" is *one* thing; blank interpretation and file name generation could turn it into more than one thing, and what would that mean? The C shell handles it differently: % set y="BIG trouble" % echo $y >$y $y: Ambiguous. As should be clear by now, assignment to keyword parameters is another context where substitution is done but file name generation is not. ----------------------------- From: Doug Gwyn <gwyn@smoke.brl.mil> Subject: Re: How to mimic the terminal driver? Date: 30 Nov 88 19:18:12 GMT To: info-unix@sem.brl.mil In article <35@umvlsi.ECS.UMASS.EDU> vishwana@umvlsi.ECS.UMASS.EDU (Chidambaram Vishwanath) writes: > I have taken upon myself the following task, viz.,: I want to add >an extra feature to the C-shell whereby I can recall earlier commands >by pressing an arrow-key. [etc.] Why reinvent the wheel? The so-called "Tenex Cshell" already has similar support built in. I think it may even have become the standard 4.3BSD Cshell. You can also get this in the Korn shell and the BRL Bourne shell. A terminal editing wrapper process was posted to one of the newsgroups only a few months ago, if you want to use the separate-process approach. ----------------------------- From: Doug Gwyn <gwyn@smoke.brl.mil> Subject: Re: * Question Date: 30 Nov 88 19:22:31 GMT To: info-unix@sem.brl.mil In article <17661@adm.BRL.MIL> wmartin@almsa-1.arpa (Will Martin -- AMXAL-RI) writes: >cat foo > /data/sa*/bar >What I don't understand is why the expansion doesn't work under "sh". It was a deliberate design decision. The target of > should be just one word, not the potential multiple words that wildcard expansion might produce. To avoid unpleasant surprises, "sh" doesn't expand wildcards in such contexts. However, note that you can save typing using the BRL Bourne shell by using the filename completion feature to automatically fill in the rest of a pathname segment once you've typed the unambiguous prefix for it. I actually prefer this approach anyway, since I get to see the full expansion before the command is executed. ----------------------------- From: Doug Gwyn <gwyn@smoke.brl.mil> Subject: Re: Adventure shell Date: 30 Nov 88 20:36:10 GMT To: info-unix@sem.brl.mil In article <Nov.30.01.27.00.1988.14076@topaz.rutgers.edu> jjoshua@topaz.rutgers.edu (Jon Joshua) writes: > I heard someone mention a shell called the adventure shell. >This shell turned Unix into an adventure game where you could pick up >files and drop them elsewhere etc... Does anyone have more info on >this shell? Better yet, does anyone have a copy? I mailed you the one I devised a few years ago. Mine was inspired by somebody's joke, but it really does work and some people even claim to like it as a shell (they must be crazy). It's a huge Bourne shell script. The version I sent requires shell functions, which is an SVR2 or later feature. If you have an obsolete shell, you will need to change the use of those functions (which manipulate lists) to in-line shell code. There are also some definitions at the start of the file for paginators, etc. that you'll need to configure properly. I think my distribution kit includes source code for the "ask" utility which is used to get responses to yes/no questions. ----------------------------- From: Doug Gwyn <gwyn@smoke.brl.mil> Subject: Re: GCOS field Date: 30 Nov 88 20:41:13 GMT To: info-unix@sem.brl.mil In article <7996@dasys1.UUCP> jpr@dasys1.UUCP (Jean-Pierre Radley) writes: >In article <1257@vsedev.VSE.COM> logan@vsedev.VSE.COM (James Logan III) writes: >>Does anyone know what GCOS really stands for and where it came from? >In my flavor of unix, that's described as the "Comment" field. That's what it has evolved to, since most current UNIX systems don't spool printer output etc. to Honeywell (formerly GE) systems. ----------------------------- From: Ken Keirnan <kjk@pbhyf.pacbell.com> Subject: Re: Troff "grap" question Date: 30 Nov 88 16:35:01 GMT To: info-unix@sem.brl.mil In article <618@wc11.idca.tds.philips.nl> ekkel@idca.tds.PHILIPS.nl (Erik Ekkel) writes: >I want to use the troff "grap" preprocessor to plot a graph. The problem is >that the input has as x-coordinate weeknumbers. So the range of the >x-axis is e.g. 8801:8852, 8901:8952, .......... > >How can i tell "grap" that there is a gap in the x-axis; that week 8901 is the >successor of week 8852 and NOT 8900 ! If you know the number of points along the x-axis in advance, one way would be to specify the number of x-axis intervals with the "coord" keyword and then make the week numbers tick labels. For example if you have 52 points on the x-axis: coord x 0,52 ticks bot out at 1 "8801",2 "8802" ... or whatever interval you want between ticks. I know this is messy, but nothing else comes to mind. -- Ken Keirnan - Pacific Bell - {att,bellcore,sun,ames,pyramid}!pacbell!pbhyf!kjk San Ramon, California kjk@pbhyf.PacBell.COM ----------------------------- From: Steve DeJarnett <steve@polyslo.calpoly.edu> Subject: Re: Anonymous ftp's Date: 30 Nov 88 06:51:59 GMT To: info-unix@sem.brl.mil In article <380001@hpcea.CE.HP.COM> twakeman@hpcea.CE.HP.COM (Teriann Wakeman) writes: >>Doug Comer has a good book out on the details of internetworking. >Ah... Got any more info about this book? ie. name, publishing date/house? >availablity? Availability: Now Title: Internetworking with TCP/IP -- Principles, Protocols, and Architecture Publisher: Prentice-Hall Publishing Date: 1988 Cost: Around $40 Good book. Explains the concepts well to those who are unfamiliar with TCP/IP, but doesn't insult your intelligence if you do know something about it. ------------------------------------------------------------------------------- | Steve DeJarnett | Smart Mailers -> steve@polyslo.CalPoly.EDU | | Computer Systems Lab | Dumb Mailers -> ..!ucbvax!voder!polyslo!steve | | Cal Poly State Univ. |------------------------------------------------| | San Luis Obispo, CA 93407 | BITNET = Because Idiots Type NETwork | ------------------------------------------------------------------------------- ----------------------------- From: Doug Toppin <toppin@melpar.uucp> Subject: Nroff/Troff Floating Displays Date: 30 Nov 88 16:42:58 GMT Keywords: Nroff,Troff To: info-unix@sem.brl.mil We are using nroff and the mm macros to generate our documentation and often have to insert pages created by other means (diagrams, etc). We are using floating displays in the following fashion: .nr De 1 \" follow output of floating page with page eject .nr Df 2 \" output floating display at top of a new page .DF stuff .De This will cause the current page to fill and then the next page will be reserved and ejected. This works well but we have not been able to insert successive floating displays without getting text pages between them. If anyone knows what to do I would appreciate it if they sent me an example via mail at: uunet!melpar!toppin Thanks Doug Toppin ----------------------------- From: Mike Khaw <mkhaw@teknowledge-vaxc.arpa> Subject: Re: Pre-formatted tapes for HP drives Date: 30 Nov 88 18:17:22 GMT To: info-unix@sem.brl.mil <274@istsists.ca>, by mathieu@ists.yorku.ca (Pierre Mathieu): > Question 1) Is it possible to load tapes into this drive that > are not pre-formatted and format them from HP-UX? Not that I know of; in fact, if you write onto a pre-formatted tape from a non-HP drive (e.g., a Sun) you destroy the formatted track(s?) and can no longer use the tape in the HP drive. > Question 2) If it is not possible, then does anybody know if other > companies than HP make these pre-formatted tapes? We 3M makes them. They are DC600HC tapes. Mike Khaw -- internet: mkhaw@teknowledge.arpa uucp: {uunet|sun|ucbvax|decwrl|ames|hplabs}!mkhaw%teknowledge.arpa hardcopy: Teknowledge Inc, 1850 Embarcadero Rd, POB 10119, Palo Alto, CA 94303 ----------------------------- From: Guy Harris <guy@auspex.uucp> Subject: Re: ls -l Date: 30 Nov 88 18:49:25 GMT Keywords: ls To: info-unix@sem.brl.mil >When a user enters the command "ls -l" on a directory, a slew of information >is given with such things as last-modified time, number of links, owner, group, >etc. Such data is usually stored in the inode. My question is this: does the >"ls" program need to open each file, to look at its inode in order to display >this data to standard output? No, it doesn't have to open the file; it can list the information about files you're not allowed to open. It uses the "stat" (or "lstat", on systems that have symbolic links if you're telling "ls" not to follow links) system call to get the information in question. This involves doing a lot of the same operations that an "open" does, namely looking up the pathname and reading the inode, in the case of a local file on a UNIX file system. >The only reason this has interested me is that it seems that, even for >long directory listings, the command takes a very short amount of time >to complete, considering all the file opening and closing I guess it's >doing. Your system is probably doing a reasonable job of caching information in memory. All UNIX implementations of local UNIX file systems with which I am familiar will cache data blocks of directory files, so to look up a file it may not have to read the directory blocks into memory. (In fact, since "ls" reads the directory itself, the blocks in question may already be *in* memory by the time it gets around to "stat"ting the file.) Similarly, blocks of the i-list will also be cached in memory. Since many inodes fit in a block, reading one block will get several inodes. Implementations of the 4.2BSD file system try to keep inodes for files within the same directory in the same blocks of the i-list, so the other inodes are more likely to be useful. In addition, there may be other caches, such as caches of directory entries (present in at least 4.3BSD, SunOS, and systems that have adopted recent versions of the SunOS VFS/NFS code) and caches of inodes that were used recently but are not currently in use. ----------------------------- From: Guy Harris <guy@auspex.uucp> Subject: Re: * Question Date: 30 Nov 88 19:41:56 GMT To: info-unix@sem.brl.mil >And, if "csh" lets this work as shown, why does it NOT work when >creating the file initially? Because a "starname" must match something that already exists. The starname "foo/*/bar" will match all files named "bar" in any subdirectory of "foo" (except those whose name begins with "."). When creating the file initially, it doesn't exist yet.... ----------------------------- From: "Richard A. O'Keefe" <ok@quintus.uucp> Subject: Re: ls -l Date: 30 Nov 88 13:20:03 GMT Sender: news@quintus.uucp Keywords: ls To: info-unix@sem.brl.mil In article <4952@boulder.Colorado.EDU> wu@spot.Colorado.EDU (WU SHI-KUEI) writes: >In article <838@nih-csl.UUCP> ted@nih-csl.UUCP (ted persky) writes: >>My question is this: does the "ls" program need to open each file, > >No - the inumbers are stored in the *directory* file, NOT in the individual >files. Try 'ls -i' and then 'od -c .' to prove this to yourself. The question was about "ls -l" (dash-lower-case-ELL) not about "ls -i" (dash-lower-case-EYE). ls -i does indeed have to inspect only the directory. ls -l, however, has to look a bit harder. There is a system call named stat() which says "tell me all about this file". It has to read the *inode*, but that is not the same as opening the *file*. That's done by the open() system call. For example, you can get stat() information about a file you do not have permission to read. ----------------------------- From: Mark Runyan <runyan@hpirs.hp.com> Subject: Re: SCCS: how to handle multiple developers/streams Date: 29 Nov 88 22:24:07 GMT To: info-unix@sem.brl.mil >/ tpc@bnr-fos.UUCP (Tom Chmara) / 10:17 am Nov 24, 1988 / I'm not an expert in SCCS, so I may not be of any help, but you have found a problem that everyone using SCCS will encounter eventually... >1. Scenario: Building a new load. Problem: devoted developer has a > module checked out for editing. I don't WANT the new version; I want the > old one. "-c" gets the old version, "-G" specifies a new path into > which I dump the file. Ergo, I need a new copy of my source > directory structure? Or does every file need an "alias" for loadbuilding? I'm not sure I understand the problem the way it is phrased. (I also don't appear to have the "-G" option you mentioned). If your developers are all working in the same directory, the problems you face are very significant. SCCS alone may not be the solution. Perhaps each developer needs their own workspace (yes, that uses a lot of disk). With links, you could reduce the disk space, but managing the links would be difficult. >2. Scenario: Doing maintenance. A bug has been reported in existing > (read: non-current) software. Do I have to rebuild (recompile) the > world to be able to restore that environment? Do I have to maintain > a copy of the directory hierarchy for every released version? Again, separate work spaces are the only answer I see for this. Once you have found the fix, checking the fix in on a branch would be a way to store it. The environment is a *major* problem. While SCCS stores the source for a file, it doesn't keep the environment (i.e. compilers, header files, etc) needed to rebuild the exact bits. I strongly suggest that a database (which could be something as simple as a flat file and some awk scripts) be considered for keeping track of which revisions of which files and programs create a particular environment. Storing the old compilers, loaders, etc. into special directories might be required. >2. Scenario: Doing development. Do I need to do development in the > current directory (i.e. parent to SCCS directory) and aggravate the > loadbuilders (see #1)? What happens if two of us are doing development > in the same directory? I'd like to use the old (read: loadbuilt) > objects to avoid having to recompile the world; so would s/he. > We're constantly going to see each other's sources. This looks like > a problem for the Makefiles... Unless I actively sccs info each > subdirectory, I don't know who else is doing development -- and that > information itself is volatile... If the SCCS directory in *your* working directory is simply a link (symbolic or otherwise) to the "real" SCCS directory, each work space will use the same SCCS files but be separate. This uses a *lot* of disk space when someone checks everything out. One solution to this is to have a program which manages links (i.e. everything is checked out into some location and linked. When you want your own copy, break the link. Need a way to keep track of which are broken links and which aren't). >I DO know that both SUN & HP use SCCS at some stage of their development >efforts, so presumably maintenance of old software streams is a subject >near (though maybe not dear) to their respective hearts. Others are also >likely to be equally knowledgeable. I'm slowly going nuts trying to envision >parallel "shadow" directories, (and subdirectories, and...). Is there >an easy way out? Is there a sane way out? What are my alternatives? Well... <cough, cough> I don't think that either SUN or HP uses *just* SCCS. (I don't think HP uses SCCS too much, but I could be wrong :-) SCCS only provides management of the revisions of a file. Frontends and support programs must exist to handle work spaces and networking. Knowing this will start a "Holy War", I'll mention that RCS allows a person to manage a group of files, but again, RCS only manages revisions. The work space and networking ( and environment ) problems are not solved by either RCS or SCCS. If a solution exists, I would really like to hear about it... I believe that solutions may arise soon as software configuration becomes more important, but I'm not aware of any solution available to the customer at the moment. Mark Runyan ----------------------------- From: "William P. Reeder" <reeder@ut-emx.uucp> Subject: Re: ls -l Date: 30 Nov 88 23:26:02 GMT Keywords: ls Posted: Wed Nov 30 17:26:02 1988 To: info-unix@sem.brl.mil In article <838@nih-csl.UUCP>, ted@nih-csl.UUCP (ted persky) writes: > it seems that, even for long directory listings, the command takes a very short > amount of time to complete, considering all the file opening and closing I guess My experience has been that ls can take a very long time to run on large directories. Several posters have already explained that ls doesn't have to open each file in the directory; but no one has talked about ls sorting the information before displaying it. I think one version of ls we had used a bubble sort, which made it unbearable in some directories (containing around 800 files). One of my (former) co-workers modified ls to use quicksort, and it helped a lot. -- DISCLAIMER: I speak only for myself, and usually only to myself. ----------------------------- From: Andrew Hume <andrew@alice.uucp> Subject: Re: fio library routines Date: 29 Nov 88 20:33:39 GMT To: info-unix@sem.brl.mil a bundle of the fio man page and macros is available via anonymous ftp at arpa.att.com robert elz (uunet!munnari!kre or something) has been talking to me about a public domain implementation. the whole source is 600 lines of code so it shouldn't be too hard. ----------------------------- From: Andrew Hume <andrew@alice.uucp> Subject: Re: fio library routines Date: 29 Nov 88 20:49:26 GMT To: info-unix@sem.brl.mil anyone who gets the mk distribution (from AT&T toolchest) has the fio source. ----------------------------- End of INFO-UNIX Digest ***********************
postmaster@sandia.gov (SMTP MAILER) (10/13/89)
----Mail status follows---- Have been unable to send your mail to <omalley%hotair@decwrl.dec.com>, will keep trying for a total of three days. At that time your mail will be returned. ----Transcript of message follows---- Date: 12 Oct 89 05:53:00 MDT From: info-unix@BRL.MIL Subject: INFO-UNIX Digest V8#090 To: "omalley" <omalley%hotair@decwrl.dec.com> Return-Path: <incoming-info-unix-request@sandia.gov> Received: from SEM.BRL.MIL by sandia.gov with SMTP ; Thu, 12 Oct 89 04:51:20 MDT Received: from SEM.BRL.MIL by SEM.brl.MIL id ab20946; 12 Oct 89 2:59 EDT Received: from sem.brl.mil by SEM.BRL.MIL id aa20850; 12 Oct 89 2:46 EDT Date: Thu, 12 Oct 89 02:46:20 EST From: The Moderator (Mike Muuss) <Info-Unix-Request@BRL.MIL> To: INFO-UNIX@BRL.MIL Reply-To: INFO-UNIX@BRL.MIL Subject: INFO-UNIX Digest V8#090 Message-ID: <8910120246.aa20850@SEM.BRL.MIL> INFO-UNIX Digest Thu, 12 Oct 1989 V8#090 Today's Topics: Re: Honey-Danbear UUCP Availability Getting the most for a process. Re: pic Re: Version 9 Unix cut for BSD Re: Getting the most for a process. Re: Stupid awk question Making a named pipe over NFS Re: home unix on the cheap Re: Bourne shell question Re: Getting the most for a process. Re: Stupid awk question Looking for the program "gone"... recommendations wanted printf() with vector arguments. Re: Making a named pipe over NFS SUN QUESTION: CDC Sabre 1.2 Gigabyte drives w/ Xylogics 753 ctrlr upper limit of NFILE and NINODE on 286? Re: TcP/Ip UNIX backup to unattended 8mm tape drive Re: Stupid awk question Re: Reversing a file? Vi Reference - version 6 Dutch Vi Reference available Vi Reference - version 6 Re: Reversing a file? ----------------------------------------------------------------- From: Harry Skelton <harrys@tons61.uucp> Subject: Re: Honey-Danbear UUCP Availability Date: 10 Oct 89 11:41:19 GMT Keywords: uucp unix To: info-unix@sem.brl.mil Even our machines, with current release of 3.2 Sys V, does not have HDB. Our vendor stated that they did not plan to support it or they'll support it in a 4.x release (eons down the road). It may be to your advantage to get something like the other PD uucp's and hack it for your machine. I'm using a uupc hack to build it up to HDB stanadard w/ zmodem. With normal work hours and home life, I don't think it will be finished anytime soon. I'll post to alt.sources when I get it running. -- Harry Skelton - Senior Systems Administrator - U.S. Dept. of Transportation ..!attctc!tons61!harrys ..!obdient!tons61!harrys ..!tfd!tons61!harrys [ Views expressed by Harry Skelton are not those of the US Gov. or CBSI ] ----------------------------- From: Doug Perlich <doug@cogent.uucp> Subject: Getting the most for a process. Date: 10 Oct 89 20:18:01 GMT Keywords: Dedication, priority. To: info-unix@sem.brl.mil I have recently become interested in having an application program run as fast as possible! (Sound familiar)? What I am interested in is how can a program get a higher priority at run time. More exactly what other methods are there to get screaming performance out of a UNIX machine. As I understand it only root can use a negative nice to make a program run faster, are there ways of dedicating a processor (w/ or wo/ a multiprocessor)? I am mainly interested in a multi-user system. It seems to me the answer is no because then every programmer would try this in his/her code and the system would halt. -Doug. . . ----------------------------- From: Doug Gwyn <gwyn@smoke.brl.mil> Subject: Re: pic Date: 11 Oct 89 06:47:54 GMT To: info-unix@sem.brl.mil In article <46215f96.81da@digital.sps.mot.com> chen@digital (Jinfu Chen) writes: >Every once a while I find some *roff documents include simple pictures >to be processed via `pic'. Where's this `pic' program comes from? "pic" is part of the Documenter's WorkBench package licensed by AT&T. Sometimes DWB is bundled with a vendor's implementation of UNIX, sometimes it is available from the vendor as an extra-cost option, and sometimes you have to turn to a third party (e.g. Elan, SoftQuad) to obtain it. I know of no public-domain implementation of "pic". ----------------------------- From: Doug Gwyn <gwyn@smoke.brl.mil> Subject: Re: Version 9 Unix Date: 11 Oct 89 07:01:34 GMT To: info-unix@sem.brl.mil In article <1989Oct10.215504.3391@sdsu.edu> arul@sdsu.edu (Arul Ananthanarayanan) writes: >I am curious as to what Version 9 Unix is like. I hear that it is run >in-house at Bell Labs. >Is it similar to System V, or BSD4.3? >Pointers to any papers would be greatly appreciated. Ninth Edition Unix evolved from the Eighth Edition, which evolved from 4BSD. Along the way, many modifications and additions occurred, among them the "streams" I/O subsystem (precursor of System V STREAMS), file system switch, network filesystem, processes as files, Blit support, and much more. Apart from the BLTJ special issue on Unix (not the BSTJ special issue!), papers can be found in many of the USENIX Conference Proceedings and in a few other journals. The Tenth Edition of the Unix documentation is being prepared now (the system itself undergoes continual evolution; the hardcopy documentation is officially updated every so often). UNIX System V Release 4 will include much of the Ninth Edition's facilities, generally in somewhat revised form. ----------------------------- From: Quang Ngo <quang@csuf3b.uucp> Subject: cut for BSD Date: 11 Oct 89 07:54:51 GMT To: info-unix@sem.brl.mil There is a cut command for System V, but not for BSD. Is there such a command for BSD that acts like cut? Thank you, Quang Ngo^ ******************************************************************************** /* * email = quang@csufres.csufresno.edu * quang@redwood.UUCP */ ******************************************************************************** ----------------------------- From: George Seibel <seibel@cgl.ucsf.edu> Subject: Re: Getting the most for a process. Date: 11 Oct 89 08:31:31 GMT Sender: daemon@cgl.ucsf.edu Keywords: Dedication, priority. To: info-unix@sem.brl.mil In article <593@cogent.UUCP> doug@cogent.UUCP (Doug Perlich) writes: >I have recently become interested in having an application program run as fast >as possible! (Sound familiar)? Yup. >What I am interested in is how can a program get a higher priority at run time. >More exactly what other methods are there to get screaming performance out of >a UNIX machine. >As I understand it only root can use a negative nice to make a program run >faster, are there ways of dedicating a processor (w/ or wo/ a multiprocessor)? > >I am mainly interested in a multi-user system. > >It seems to me the answer is no because then every programmer would try this >in his/her code and the system would halt. Even if you get 100% of the machine, you only go as fast as the machine will run your program. Here's what to do if you *really* want to go fast: 1) Choose the best algorithm. e.g. Quicksort beats Bubble sort... 2) profile the application with representative inputs. The usual scenario is: cc -p applic.c -o applic [could be f77 or pc instead of cc] applic [will produce file "mon.out"] prof applic > prof.out Now look in prof.out. This should tell you where your program is spending its time. Look at those parts of the code. Are they doing unnecessary work? Find a hacker and ask how to make it go faster. Bringing frequently-called functions inline is usually a win. If you're doing a lot of I/O, can it be brought in-core? Can you use binary files instead of formatted files? Check out the options on your compiler. Try the optimisation options. Make sure you are not using runtime bounds checking. Are you even using a compiler? If the application is written in an interpreted language, there probably is no profiler or optimiser. Consider rewriting. What if you aren't a programmer, or you don't have the source code? 3) Buy a faster computer. (This is also a valid solution if you *are* a programmer) George Seibel, UCSF ----------------------------- From: "Jonathan I. Kamens" <jik@athena.mit.edu> Subject: Re: Stupid awk question Date: 11 Oct 89 06:48:16 GMT Sender: news@bloom-beacon.mit.edu To: info-unix@sem.brl.mil In article <DMAUSTIN.89Oct10145918@vivid.sun.com> dmaustin@vivid.sun.com (Darren Austin) writes: >Hi all, > I am trying to split up a large output file into several >smaller files. The smaller files are named after the value in >the second field. I tried using the following simple awk script, > >(current == $2) {print > current".summary"} >(current != $2) {close(current".summary");current=$2;print > current".summary";} > >but it fails with > >awk: too many output files 10 Allow me to quote from "Awk -- A Pattern Scanning and Processing Language (Second Edition)", by Alfred V. Aho, Brian W. Kernighan, and Peter J. Weinberger. I got my copy out of /usr/doc on my system. Page 2, on section 1.4 about printing, says, "Naturally there is a limit on the number of output files; currently it is 10." A lot of implementations have overcome this limitation. Apparently, the version of awk you are using has not. May I suggest either nawk (I don't know where/under what conditions that's available), or gawk (available for nothing whereever fine GNU products are distributed)? Jonathan Kamens USnail: MIT Project Athena 11 Ashford Terrace jik@Athena.MIT.EDU Allston, MA 02134 Office: 617-253-4261 Home: 617-782-0710 P.S. Despite the title you gave it, it's not really a "stupid" awk question, especially since the man page doesn't even appear to mention this limitation, or at least not that I could find. ----------------------------- From: Richard O'Keefe <ok@cs.mu.oz.au> Subject: Making a named pipe over NFS Date: 11 Oct 89 12:35:34 GMT Sender: news@cs.mu.oz.au Keywords: /etc/mknod, fifo, NFS, SunOS To: info-unix@sem.brl.mil I am using a Sun-3/50 called mudla. Here's what /etc/motd says about it: SunOS Release 4.0_Export (MULLO_CLIENT_50) #1: Wed May 24 18:23:08 EST 1989 My files are held on a file server called mullauna, an Encore Multimax, and are accessed through NFS. Here's what I see when I log in on mullauna: UNIX System V Release ax.2.2f ns32332 Now, SunOS supports named pipes, and System V supports named pipes, and the network is the computer, so named pipes should work, not so? No. On mullauna (the server), in my home directory: % rm -f zabbo % /etc/mknod zabbo p % file zabbo zabbo: fifo just as I would expect. On mudla (the client), in my home directory (the same directory): % rm -f zabbo % /etc/mknod zabbo p % file zabbo zabbo: empty This came as a rather unpleasant surprise. To check whether SunOS really does understand named pipes, I tried % rm -f /tmp/zabbo % /etc/mknod /tmp/zabbo p % file /tmp/zabbo /tmp/zabbo: fifo mudla's /tmp is served from another Sun-3. Is this supposed to work, or should I just forget about named pipes? ----------------------------- From: Wm E Davidsen Jr <davidsen@crdos1.crd.ge.com> Subject: Re: home unix on the cheap Date: 11 Oct 89 15:05:33 GMT To: info-unix@sem.brl.mil In article <34345@srcsip.UUCP>, jkimball@SRC.Honeywell.COM (John Kimball) writes: | I've started to think about acquiring a home Unix machine, to replace my | CP/M machine. | | The main purposes would be | o email and news | o ability to run most of the freely-redistributable software we use | at work (mainly GNU stuff) If you really only want what you describe, buy a used unix-pc. It's slow and somewhat limited, but it will do what you want and should be <$1000 for the machine and software. If you want more performance buy a cheap 386 and cheap UNIX. The unmodified SysV versions like ix/386 and ESIX have the AT&T compiler, Xenix has it's own, more ANSI features, cross compiles to DOS, costs more. Having used both I find about the same number of bugs in each, but diferent bugs. If you don't need ANSI or DOS go with the regular SysV or SCO UNIX, has both compilers and does OS/2 (whoopee?). If you want cheap BSD look for a refurbished Sun-2. A friend of mine got one with mono and color for about $2k. They are advertised in the magazines from time to time. Repair ====== unix-pc - good luck. There are places which do it. 386 - warantee, lots of places repair. Sun-2 - ask locally, it varies. Usually not cheap. -- bill davidsen (davidsen@crdos1.crd.GE.COM -or- uunet!crdgw1!crdos1!davidsen) "The world is filled with fools. They blindly follow their so-called 'reason' in the face of the church and common sense. Any fool can see that the world is flat!" - anon ----------------------------- From: "Conor P. Cahill" <cpcahil@virtech.uucp> Subject: Re: Bourne shell question Date: 11 Oct 89 12:06:12 GMT Keywords: pipe, logical 'or' and " pg ". To: info-unix@sem.brl.mil In article <1943@sactoh0.UUCP>, jak@sactoh0.UUCP (Jay A. Konigsberg) writes: > > When the pipe into " pg " is removed it works ok, but I would like > to keep the pg in the script. Your problem is that pg always exits with a 0 (at least I could not get any non-zero exit) and therefore the stuff to the right of the || will never be executed. You could do the following: (ls -l | grep "^d" || echo "There are no subdirectories" ) | pg or you could re-write the script so it used more than 1 line: ls -l | grep "^d" > /tmp/sh$$ if [ $? = 0 ]; then pg /tmp/sh$$ else echo "There are no ..." fi rm /tmp/sh$$ -- +-----------------------------------------------------------------------+ | Conor P. Cahill uunet!virtech!cpcahil 703-430-9247 ! | Virtual Technologies Inc., P. O. Box 876, Sterling, VA 22170 | +-----------------------------------------------------------------------+ ----------------------------- From: Jim Frost <madd@bu-cs.bu.edu> Subject: Re: Getting the most for a process. Date: 11 Oct 89 19:06:12 GMT Followup-To: comp.unix.questions To: info-unix@sem.brl.mil In article <12034@cgl.ucsf.EDU> seibel@cgl.ucsf.edu (George Seibel) writes: |In article <593@cogent.UUCP> doug@cogent.UUCP (Doug Perlich) writes: |>More exactly what other methods are there to get screaming performance out of |>a UNIX machine. | |Even if you get 100% of the machine, you only go as fast as the machine |will run your program. Here's what to do if you *really* want to go fast: Very valid techniques. There are others that may work depending on your application which can squeeze even more performance out of your machine. UNIX splits up the CPU amongst processes (and threads if your UNIX supports them). A single application can thus get more CPU at the same priority if you can break the job up between multiple processes or threads. It's generally easier to do this with threads than with separate processes, but you can do pretty well with separate processes and shared memory for a lot of tasks -- particularly sequential independent calculations (often found inside loops). A simple shell script illustrates the principle: #! /bin/csh foreach i (/usr/*) find $i -name foo end versus: #! /bin/csh foreach i (/usr/*) find $i -name foo & end The latter will finish much faster (unless it thrashes the system), but it has at least one problem -- output will become intermingled unless you give each process its own output file. The same sorts of problems will have to be solved for a real application; see any operating systems book for lots of solutions. This method of parallelism is seen most often on multiprocessor machines since processes will tend to execute on separate processors and you get incredible throughput improvements. On the Encore Multimax this technique is used for grep and make, for instance. The technique still works on single processors -- obviously so since the whole idea behind multitasking is to fully utilize the CPU (amongst other resources), but usually not as well. |>It seems to me the answer is no because then every programmer would try this |>in his/her code and the system would halt. Yes, this technique will definitely hurt the system if you run too many parallel processes, but so will any technique that gives a single application more than its "share" of CPU. It's also a lot harder because you have to coordinate processes so many people won't bother unless they really need it or the system makes such a thing easy (I have yet to see a system where it was particularly easy to parallelize tasks effectively :-). jim frost software tool & die madd@std.com ----------------------------- From: Mitchell Wyle <wyle@inf.ethz.ch> Subject: Re: Stupid awk question Date: 11 Oct 89 17:00:11 GMT To: info-unix@sem.brl.mil In article <DMAUSTIN.89Oct10145918@vivid.sun.com> dmaustin@vivid.sun.com (Darren Austin) writes: >I am trying to split up a large output file into several >smaller files. The smaller files are named after the value in >the second field. I tried using the following simple awk script, > >(current == $2) {print > current".summary"} >(current != $2) {close(current".summary"); > current=$2;print > current".summary";} > >but it fails with > >awk: too many output files 10 Even though everyone will soon have new awk and all these old awk problems will go away, I think this question deserves to be in the "Frequently asked questions and answers" periodic postings. Who moderates it? How should one post to it? * * * To answer the question, I shall quote verbatum an old article. >>I am trying to use AWK to split one file into many formatted, smaller files. >>The problem I am having is that I cannot output to more than 10 files... > > Well, it won't help you right now, but the long-term fix is to complain > to your software supplier and ask them to get rid of the silly limit. > It's not that hard. The limits are based on the number of file descriptors that can be open at one time (usually small). One way that I often get around this is by writting something like this which splits up the input on the field $1 . sort +0 | awk ' { if (last != $1) { if (NR > 0) print "!XYZZY"; print "cat > " $1 "<<!XYZZY"; last = $1; } print; } END { if (NR > 0) print "!XYZZY"; }' | /bin/sh Tony O'Hagan tonyo@qitfit.qitcs.oz * * * I use Tony's solution all the time. I have seen it used by at least two other people (David Goodenough and Amos Shapiro) in shell scripts posted to the net. It is very important to put that trailing End_of_Here_Document string in the END clause of your awk program! Depending on the complexity of your parse, you might need other cleanup code there as well. Happy hacking, -Mitchell F. Wyle Institut fuer Informationssysteme wyle@inf.ethz.ch ETH Zentrum / 8092 Zurich, Switzerland +41 1 256 5237 -- If this appears in _IN_MODERATION_ or ClariNet, please let me know. I am forbidden to tell you that you can reach me at: ...!uunet!mcvax!ethz!wyle or wyle@rascal.ics.utexas.edu ----------------------------- From: Marty Saletta <sale5312@fredonia.uucp> Subject: Looking for the program "gone"... Date: 11 Oct 89 20:23:59 GMT To: info-unix@sem.brl.mil Yes, can some nice person in NetLand tell me where I can get a copy of the PD program gone? Gone is an alternative to "lock" that I used earlier this year from comp.sources.unix (or one of the other newsgroups.) Thanks in advance! -Marty -- / / |\ | / / | / ~Marty Saletta @ Fredonia,New York~~Leafs:3rd place~ / __ /__ | \| /__ / | / ~Atari ST,New York Yankees,Who,Pink Floyd,ELP,Fripp~ \ / \ | | \ \ | \ ~Toronto Maple Leafs,Yes,CZ-1,Mad Max,and hi Lorie!~ \/ \ | | \ / | / ~UUCP:...{decvax,rutgers}!sunybcs!fredonia!sale5312~ ----------------------------- From: Chris Gregory <chris@tiamat.fsc.com> Subject: recommendations wanted Date: 11 Oct 89 20:47:14 GMT Followup-To: comp.dcom.lans Keywords: TCP/IP, ethernet, SCO Unix 3.2, vendors To: info-unix@sem.brl.mil A couple of questions: 1) Where can I get TCP/IP for SCO Unix 3.2? Surely someone out there is using it. I've been calling around, but can't seem to find a anyone that has it. 2) Where is a good place to get ethernet cards? I'd probably be able to find these, but I'd like some recommendations-comments-complaints about places others have dealt with. Thank you. Chris Gregory --o-- Ahlstrom Filtration, Inc. ---ooo--- (formerly Filtration Sciences Corp.) ==:::::== chris@tiamat.fsc.com =:::= ----------------------------- From: Paul Reger <paulr@sequent.uucp> Subject: printf() with vector arguments. Date: 11 Oct 89 18:02:59 GMT Keywords: printf() To: info-unix@sem.brl.mil I was wondering if there exists such a beast as: void vec_printf(char *fmt,void *args[]); (as opposed to what we're all familiar with: void printf(char *fmt, ...);) Such a thing would be useful for a tool that can be used with any shell - call it shell_printf. This would have the synopsis: shell_printf fmt [arg1 [arg2 [arg3 ... [argn]]]] and its purpose would be to format and print out its arguments to stdout in the exact same manner as printf() does. Such a tool would be useful for output in shell scripts. For example: shell_printf "There are %9d dogs, weighing %9g pounds, and my son's name is '%s'.\n\n\n" 100 12.23 Eric which would print out to stdout: `` There are 100 dogs, weighing 12.23 punds, and my son's name is 'Eric'. '' Without the vec_printf() routine, such a tool would be hard to do. paulr (Paul Reger) Sequent Computer Systems, Beaverton Oregon {uunet,ucbvax!rutgers!ogccse}!sequent!paulr -- paulr (Paul Reger) Sequent Computer Systems, Beaverton Oregon {uunet,ucbvax!rutgers!ogccse}!sequent!paulr ----------------------------- From: David Robinson <david@elroy.jpl.nasa.gov> Subject: Re: Making a named pipe over NFS Date: 11 Oct 89 23:08:55 GMT Keywords: /etc/mknod, fifo, NFS, SunOS To: info-unix@sem.brl.mil In article <2388@munnari.oz.au> ok@cs.mu.oz.au (Richard O'Keefe) writes: <I am using a Sun-3/50 called mudla. Here's what /etc/motd says about it: <SunOS Release 4.0_Export (MULLO_CLIENT_50) #1: Wed May 24 18:23:08 EST 1989 < <My files are held on a file server called mullauna, an Encore Multimax, <and are accessed through NFS. Here's what I see when I log in on mullauna: <UNIX System V Release ax.2.2f ns32332 < <Now, SunOS supports named pipes, and System V supports named pipes, and <the network is the computer, so named pipes should work, not so? No. [Description of how it fails] < Is this supposed to work, or should I just forget about named pipes? Named pipes are not the the current NFS protocol (v2), but they are supported in some NFS implementations. In SunOS 3.2 named pipes were added and the corresponding NFSSRC 3.2(may be off on the number), which many vendors base their NFS on, included a kludge to handle named pipes correctly. Most vendors have picked this up but not all. It would appear that either Encore is running an NFS based on an old version of the reference port or they built their own from scratch. In either case it is a problem with your vendor's code. -- David Robinson elroy!david@csvax.caltech.edu ARPA david@elroy.jpl.nasa.gov ARPA {cit-vax,ames}!elroy!david UUCP Disclaimer: No one listens to me anyway! ----------------------------- From: Farooq Butt <fmbutt@cloud9.stratus.com> Subject: SUN QUESTION: CDC Sabre 1.2 Gigabyte drives w/ Xylogics 753 ctrlr Date: 11 Oct 89 22:40:17 GMT Followup-To: poster To: info-unix@sem.brl.mil Has anyone in Sun-land hooked up CDC Sabre 1.2 Gigabyte drives to Sun 3/280s (with 753 or 7053 (aka SMD4 ctrlr) ctrlr) ? If so pleeeeeeeease mail me the format.dat entries for these drives. DIP switch info. will be appreciated too. I am going out of my mind trying to figure out whether Sun supports the CDC Sabre 1.2 Gbyte drive.... Thanks a Giga-load, Fmb -- NOTHING in the above article has the slightest relationship to reality. If any reality correspondences are found, please notify me IMMEDIATELY. Any threats, abuse or stupidity of any kind are purely UNINTENTIONAL. My employer does not know that I exist and is not responsible for anything. ----------------------------- From: "Barton A. Fisk" <barton@holston.uucp> Subject: upper limit of NFILE and NINODE on 286? Date: 11 Oct 89 22:53:56 GMT Keywords: 286, sco, xenix To: info-unix@sem.brl.mil What, if any would be the upper limit that may be set for NFILE and NINODE in /usr/sys/conf/master for a 286? What determines this limit? What would be the most painless way of finding out if a value has taken effect for these variables? Many thanks in advance as usual. -- Barton A. Fisk | UUCP: {attctc,texbell,vector}!warble!holston!barton PO Box 1781 | (PSEUDO) DOMAIN: barton@holston.UUCP Lake Charles, La. 70602 | ---------------------------------------- 318-439-5984 | "Let him who is without sin cast the first stone"-JC ----------------------------- From: Lyndon Nerenberg <lyndon@cs.athabascau.ca> Subject: Re: TcP/Ip Date: 11 Oct 89 23:00:22 GMT To: info-unix@sem.brl.mil In article <21092@adm.BRL.MIL> CSSNET%NUSDISCS.BITNET@cunyvm.cuny.edu writes: > Wollongong Integrated Networking WIN/3B: Release 2.1 > AT&T 10base5 Network Interface (NI) Package: Release 1.1 Release 2.1 contains a number of bugs -- enough to make it almost unuseable. About the only solution is to upgrade to WIN/TCP 3.0. You also need to do some heavy tuning of the kernel parameters. We run with the following parameters: master.d/tcp NTCP=64 master.d/ucp NUDP=128 You also need to crank up some of the streams stuff (TIMOD & TIRDWR) but I don't have the specific values handy. > We are running the above on our AT&T 3B4000/15 Pity. -- Lyndon Nerenberg VE6BBM / Computing Services / Athabasca University {alberta,decwrl,lsuc}!atha!lyndon || lyndon@cs.AthabascaU.CA "I think every man should have a wife. You can't blame everything on the government." -- Jed Clampett ----------------------------- From: Dave Thompson <davet@iscuva.iscs.com> Subject: UNIX backup to unattended 8mm tape drive Date: 12 Oct 89 00:52:55 GMT Keywords: backup To: info-unix@sem.brl.mil We would like help finding a software package to do UNIX backups. We have an Ethernet LAN with a number of UNIX boxes, each with a hard disk. We have a DEC microVAX 2 with an 8mm 2.3 Gigabyte Exabyte tape backup system. We want to backup the UNIX boxes, one after another, onto one 8mm tape, unattended. Is there software out there that can do the job??? Thanks for any help or info that you have. Respond to: David Thompson at davet@iscuva.iscs.com -- David Thompson UUCP: davet@iscuva.ISCS.COM ISC-Bunker Ramo Corporation (uunet!iscuva!davet) East 22425 Appleway Phone: +1 509 927 5115 Liberty Lake, WA 99019 ----------------------------- From: 9704 <bink@aplcen.apl.jhu.edu> Subject: Re: Stupid awk question Date: 12 Oct 89 02:07:49 GMT To: info-unix@sem.brl.mil In article <3731@ethz-inf.UUCP> wyle@ethz.UUCP (Mitchell Wyle) writes: > In article <DMAUSTIN.89Oct10145918@vivid.sun.com> Darren Austin writes: > > >I am trying to split up a large output file into several > >smaller files. The smaller files are named after the value in > >the second field. I tried using the following simple awk script, > > [...] > >but it fails with > >awk: too many output files 10 > > [...] > sort +0 | awk '[SCRIPT BY TONY O'HAGAN DELETED]' | /bin/sh > [...] If you don't have access to the new AWK, but do have the "bs" command (mini-language) on your machine, I've found it also works well for splitting a file into subfiles which are named by a field of the input. The following bs program should solve Mr. Austin's problem in one process: #!/bin/bs # Split the input into files named by the 2nd field. outfile = "" while ?(line = get) match (line, "[^\t ]*[\t ]*\([^\t ]*\)") if mstring(1) != outfile open ("put", outfile=mstring(1), "w") put = line next run (The open seems to automatically close the previous file) I don't know how portable this is; bs is available in System V.2 anyway. Type ^N now for a way to do this in 1 line of PERL, by Mr. Schwartz... ;-) -- Greg Ubben bink@aplcen.apl.jhu.edu ...!uunet!mimsy!aplcen!bink ----------------------------- From: Donald McLachlan <don@dgbt.uucp> Subject: Re: Reversing a file? Date: 9 Oct 89 04:06:34 GMT To: info-unix@sem.brl.mil If you wnat to reverse the lines from right to left, try the command 'rev filename'. ----------------------------- From: Maarten Litmaath <maart@cs.vu.nl> Subject: Vi Reference - version 6 Date: 5 Oct 89 06:28:23 GMT Expires: 2 Nov 92 05:00:00 GMT To: info-unix@sem.brl.mil It'll never end. Many Minor Modifications, some additions. A patch would be twice as big. Still `old' format (what happened to you, Kevin?). Enjoy. : This is a shar archive. Extract with sh, not csh. : This archive ends with exit, so do not worry about trailing junk. : --------------------------- cut here -------------------------- PATH=/bin:/usr/bin:/usr/ucb CTRL_L="`echo L | tr L '\14'`" echo Extracting 'vi.ref.6' sed -e 's/^X//' \ -e "s/^Control-L$/$CTRL_L/" > 'vi.ref.6' << '+ END-OF-FILE ''vi.ref.6' X X X X X X //////////////////////////////////////////////////////////////////////// X / VI REFERENCE (by maart@cs.vu.nl) / X //////////////////////////////////////////////////////////////////////// X X Warning: some vi versions don't support the more esoteric features X described in this document. You can edit/redistribute this document X freely, as long as you don't make false claims on original authorship. X X default values : 1 X ^X : <ctrl>x X [*] : `*' is optional X <*> : `*' must not be taken literally X <sp> : space X <cr> : carriage return X <lf> : linefeed X <ht> : horizontal tab X <esc> : escape X <erase> : your erase character X <kill> : your kill character X <intr> : your interrupt character X <a-z> : an element in the range X N : number (`*' = allowed, `-' = not appropriate) X CHAR : char unequal to <ht>|<sp> X WORD : word followed by <ht>|<sp>|<lf> XControl-L X X X X X X ///////////////// X / move commands / X ///////////////// X X N | Command | Meaning X ---+--------------------+----------------------------------------------- X * | h | ^H | <erase> | <*> chars to the left. X * | j | <lf> | ^N | <*> lines downward. X * | l | <sp> | <*> chars to the right. X * | k | ^P | <*> lines upward. X * | $ | To the end of line <*> from the cursor. X - | ^ | To the first CHAR of the line. X * | _ | To the first CHAR <*> - 1 lines lower. X * | - | To the first CHAR <*> lines higher. X * | + | <cr> | To the first CHAR <*> lines lower. X - | 0 | To the first char of the line. X * | | | To column <*> (<ht>: only to the endpoint). X * | f<char> | <*> <char>s to the right (find). X * | t<char> | Till before <*> <char>s to the right. X * | F<char> | <*> <char>s to the left. X * | T<char> | Till after <*> <char>s to the left. X * | ; | Repeat latest `f'|`t'|`F'|`T' <*> times. X * | , | Idem in opposite direction. X * | w | <*> words forward. X * | W | <*> WORDS forward. X * | b | <*> words backward. X * | B | <*> WORDS backward. X * | e | To the end of word <*> forward. X * | E | To the end of WORD <*> forward. X * | G | Go to line <*> (default EOF). X * | H | To line <*> from top of the screen (home). X * | L | To line <*> from bottom of the screen (last). X - | M | To the middle line of the screen. X * | ) | <*> sentences forward. X * | ( | <*> sentences backward. X * | } | <*> paragraphs forward. X * | { | <*> paragraphs backward. X - | ]] | To the next section (default EOF). X - | [[ | To the previous section (default begin of file). X - | `<a-z> | To the mark. X - | '<a-z> | To the first CHAR of the line with the mark. X - | `` | To the cursor position before the latest absolute X | jump (of which are examples `/' and `G'). X - | '' | To the first CHAR of the line on which the cursor X | was placed before the latest absolute jump. X - | /<string> | To the next occurrence of <string>. X - | ?<string> | To the previous occurrence of <string>. X - | n | Repeat latest `/'|`?' (next). X - | N | Idem in opposite direction. X - | % | Find the next bracket and go to its match X | (also with `{'|`}' and `['|`]'). XControl-L X X X X X X ///////////////////////// X / searching (see above) / X ///////////////////////// X X :ta <name> | Search in the tags file where <name> is X | defined (file, line), and go to it. X ^] | Use the name under the cursor in a `:ta' command. X :[x,y]g/<string>/<cmd> | Search globally [from line x to y] for <string> X | and execute the `ex' <cmd> on each occurrence. X :[x,y]v/<string>/<cmd> | Execute <cmd> on the lines that don't match. X X /////////////////// X / undoing changes / X /////////////////// X X u | Undo the latest change. X U | Undo all changes on a line, while not having X | moved off it (unfortunately). X :q! | Quit vi without writing. X :e! | Re-edit a messed-up file. X X /////////////////////////////////// X / appending text (end with <esc>) / X /////////////////////////////////// X X * | a | <*> times after the cursor. X * | A | <*> times at the end of line. X * | i | <*> times before the cursor (insert). X * | I | <*> times before the first CHAR of the line X * | o | On a new line below the current (open). X | The count is only useful on a slow terminal. X * | O | On a new line above the current. X | The count is only useful on a slow terminal. X * | ><move> | Shift the lines described by <*><move> one X | shiftwidth to the right (layout!). X * | >> | Shift <*> lines one shiftwidth to the right. X * | ["<a-z1-9>]p | Put the contents of the (default undo) buffer X | <*> times after the cursor. X | A buffer containing lines is put only once, X | below the current line. X * | ["<a-z1-9>]P | Put the contents of the (default undo) buffer X | <*> times before the cursor. X | A buffer containing lines is put only once, X | above the current line. X * | . | Repeat previous command <*> times. X | If the last command before a `.' command X | references a numbered buffer, the buffer number X | is incremented first (and the count is ignored): X | X | "1pu.u.u.u.u - `walk through' buffers 1 X | through 5 X | "1P.... - restore them XControl-L X X X X X X ///////////////// X / deleting text / X ///////////////// X X Everything deleted can be stored into a buffer. This is achieved by X putting a `"' and a letter <a-z> before the delete command. The X deleted text will be in the buffer with the used letter. If <A-Z> X is used as buffer name, the adjugate buffer <a-z> will be augmented X instead of overwritten with the text. The undo buffer always X contains the latest change. Buffers <1-9> contain the latest 9 X LINE deletions (`"1' is most recent). X X * | x | Delete <*> chars under and after the cursor. X * | X | <*> chars before the cursor. X * | d<move> | From begin to endpoint of <*><move>. X * | dd | <*> lines. X - | D | The rest of the line. X * | <<move> | Shift the lines described by <*><move> one X | shiftwidth to the left (layout!). X * | << | Shift <*> lines one shiftwidth to the left. X * | . | Repeat latest command <*> times. X X ////////////////////////////////// X / changing text (end with <esc>) / X ////////////////////////////////// X X * | r<char> | Replace <*> chars by <char> - no <esc>. X * | R | Overwrite the rest of the line, X | appending change <*> - 1 times. X * | s | Substitute <*> chars. X * | S | <*> lines. X * | c<move> | Change from begin to endpoint of <*><move>. X * | cc | <*> lines. X * | C | The rest of the line and <*> - 1 next lines. X * | =<move> | If the option `lisp' is set, this command X | will realign the lines described by <*><move> X | as though they had been typed with the option X | `ai' set too. X - | ~ | Switch lower and upper cases. X * | J | Join <*> lines (default 2). X * | . | Repeat latest command <*> times (`J' only once). X - | & | Repeat latest `ex' substitute command, e.g. X | `:s/wrong/good'. X - | :[x,y]s/<p>/<r>/<f>| Substitute (on lines x through y) the pattern X | <p> (default the last pattern) with <r>. Useful X | flags <f> are `g' for `global' (i.e. change every X | non-overlapping occurrence of <p>) and `c' for X | `confirm' (type `y' to confirm a particular X | substitution, else <cr>). Instead of `/' any X | punctuation CHAR unequal to <lf> can be used as X | delimiter. XControl-L X X X X X X /////////////////////////////////// X / substitute replacement patterns / X /////////////////////////////////// X X The basic meta-characters for the replacement pattern are `&' and `~'; X these are given as `\&' and `\~' when nomagic is set. Each instance X of `&' is replaced by the characters which the regular expression X matched. The meta-character `~' stands, in the replacement X pattern, for the defining text of the previous replacement X pattern. Other meta-sequences possible in the replacement pattern X are always introduced by the escaping character `\'. The sequence X `\n' (with `n' in [1-9]) is replaced by the text matched by the X n-th regular subexpression enclosed between `\(' and `\)'. The X sequences `\u' and `\l' cause the immediately following character X in the replacement to be converted to upper- or lower-case X respectively if this character is a letter. The sequences `\U' and X `\L' turn such conversion on, either until `\E' or `\e' is X encountered, or until the end of the replacement pattern. X X ////////////////////////////// X / remembering text (yanking) / X ////////////////////////////// X X With yank commands you can put `"<a-z>' before the command, just as X with delete commands. Otherwise you only copy to the undo buffer. X The use of buffers <a-z> is THE way of copying text to another X file; see the `:e <file>' command. X X * | y<move> | Yank from begin to endpoint of <*><move>. X * | yy | <*> lines. X * | Y | Idem (should be equivalent to `y$' though). X - | m<a-z> | Mark the cursor position with a letter. X X //////////////////////////////////////// X / commands while in append|change mode / X //////////////////////////////////////// X X ^@ | If typed as the first character of the X | insertion, it is replaced with the previous X | text inserted (max. 128 chars), after which X | the insertion is terminated. X ^V | Deprive the next char of its special meaning X | (e.g. <esc>). X ^D | One shiftwidth to the left. X 0^D | Remove all indentation on the current line X | (there must be no other chars on the line). X ^^D | Idem, but it is restored on the next line. X ^T | one shiftwidth to the right X ^H | <erase> | One char back. X ^W | One word back. X <kill> | Back to the begin of the change on the X | current line. X <intr> | like <esc>. XControl-L X X X X X X ///////////////////////////////////////////////// X / writing, editing other files, and quitting vi / X ///////////////////////////////////////////////// X X In `:' `ex' commands `%' denotes the current file, `#' is a synonym for X the alternate file (which normally is the previous file). X Marks can be used for line numbers too: '<a-z>. X In the `:w'|`:f'|`:cd'|`:e'|`:n' commands shell meta-characters can be X used. X X :q | Quit vi, unless the buffer has been changed. X :q! | Quit vi without writing. X ^Z | Suspend vi. X :w | Write the file. X :w <name> | Write to the file <name>. X :w >> <name> | Append the buffer to the file <name>. X :w! <name> | Overwrite the file <name>. X :x,y w <name> | Write lines x through y to the file <name>. X :wq | Write the file and quit vi; some versions quit X | even if the write was unsuccessful! X | Use `ZZ' instead. X ZZ | Write if the buffer has been changed, and X | quit vi. If you have invoked vi with the `-r' X | option, you'd better write the file X | explicitly (`w' or `w!'), or quit the X | editor explicitly (`q!') if you don't want X | to overwrite the file - some versions of vi X | don't handle the `recover' option very well. X :x [<file>] | Idem [but write to <file>]. X :x! [<file>] | `:w![<file>]' and `:q'. X :pre | Preserve the file - the buffer is saved as if X | the system had just crashed; for emergencies, X | when a `:w' command has failed and you don't X | know how to save your work (see `vi -r'). X :f <name> | Set the current filename to <name>. X :cd [<dir>] | Set the working directory to <dir> X | (default home directory). X :cd! [<dir>] | Idem, but don't save changes. X :e [+<cmd>] <file> | Edit another file without quitting vi - the X | buffers are not changed (except the undo X | buffer), so text can be copied from one file to X | another this way. [Execute the `ex' command X | <cmd> (default `$') when t-- Did Andy Tanenbaum get his programming |Maarten Litmaath @ VU Amsterdam: instruction from a Cereal box? (Sam McCrea)|maart@cs.vu.nl, mcvax!botter!maart ----------------------------- From: Maarten Litmaath <maart@cs.vu.nl> Subject: Dutch Vi Reference available Date: 5 Oct 89 06:40:08 GMT To: info-unix@sem.brl.mil Email if you're interested. -- Did Andy Tanenbaum get his programming |Maarten Litmaath @ VU Amsterdam: instruction from a Cereal box? (Sam McCrea)|maart@cs.vu.nl, mcvax!botter!maart ----------------------------- From: Maarten Litmaath <maart@cs.vu.nl> Subject: Vi Reference - version 6 Date: 5 Oct 89 06:49:50 GMT Expires: 2 Nov 92 05:00:00 GMT To: info-unix@sem.brl.mil It'll never end. Many Minor Modifications, some additions. A patch would be twice as big. Still `old' format (what happened to you, Kevin?). Enjoy! : This is a shar archive. Extract with sh, not csh. : This archive ends with exit, so do not worry about trailing junk. : --------------------------- cut here -------------------------- PATH=/bin:/usr/bin:/usr/ucb CTRL_L="`echo L | tr L '\14'`" echo Extracting 'vi.ref.6' sed -e 's/^X//' \ -e "s/^Control-L$/$CTRL_L/" > 'vi.ref.6' << '+ END-OF-FILE ''vi.ref.6' X X X X X X //////////////////////////////////////////////////////////////////////// X / VI REFERENCE (by maart@cs.vu.nl) / X //////////////////////////////////////////////////////////////////////// X X Warning: some vi versions don't support the more esoteric features X described in this document. You can edit/redistribute this document X freely, as long as you don't make false claims on original authorship. X X default values : 1 X ^X : <ctrl>x X [*] : `*' is optional X <*> : `*' must not be taken literally X <sp> : space X <cr> : carriage return X <lf> : linefeed X <ht> : horizontal tab X <esc> : escape X <erase> : your erase character X <kill> : your kill character X <intr> : your interrupt character X <a-z> : an element in the range X N : number (`*' = allowed, `-' = not appropriate) X CHAR : char unequal to <ht>|<sp> X WORD : word followed by <ht>|<sp>|<lf> XControl-L X X X X X X ///////////////// X / move commands / X ///////////////// X X N | Command | Meaning X ---+--------------------+----------------------------------------------- X * | h | ^H | <erase> | <*> chars to the left. X * | j | <lf> | ^N | <*> lines downward. X * | l | <sp> | <*> chars to the right. X * | k | ^P | <*> lines upward. X * | $ | To the end of line <*> from the cursor. X - | ^ | To the first CHAR of the line. X * | _ | To the first CHAR <*> - 1 lines lower. X * | - | To the first CHAR <*> lines higher. X * | + | <cr> | To the first CHAR <*> lines lower. X - | 0 | To the first char of the line. X * | | | To column <*> (<ht>: only to the endpoint). X * | f<char> | <*> <char>s to the right (find). X * | t<char> | Till before <*> <char>s to the right. X * | F<char> | <*> <char>s to the left. X * | T<char> | Till after <*> <char>s to the left. X * | ; | Repeat latest `f'|`t'|`F'|`T' <*> times. X * | , | Idem in opposite direction. X * | w | <*> words forward. X * | W | <*> WORDS forward. X * | b | <*> words backward. X * | B | <*> WORDS backward. X * | e | To the end of word <*> forward. X * | E | To the end of WORD <*> forward. X * | G | Go to line <*> (default EOF). X * | H | To line <*> from top of the screen (home). X * | L | To line <*> from bottom of the screen (last). X - | M | To the middle line of the screen. X * | ) | <*> sentences forward. X * | ( | <*> sentences backward. X * | } | <*> paragraphs forward. X * | { | <*> paragraphs backward. X - | ]] | To the next section (default EOF). X - | [[ | To the previous section (default begin of file). X - | `<a-z> | To the mark. X - | '<a-z> | To the first CHAR of the line with the mark. X - | `` | To the cursor position before the latest absolute X | jump (of which are examples `/' and `G'). X - | '' | To the first CHAR of the line on which the cursor X | was placed before the latest absolute jump. X - | /<string> | To the next occurrence of <string>. X - | ?<string> | To the previous occurrence of <string>. X - | n | Repeat latest `/'|`?' (next). X - | N | Idem in opposite direction. X - | % | Find the next bracket and go to its match X | (also with `{'|`}' and `['|`]'). XControl-L X X X X X X ///////////////////////// X / searching (see above) / X ///////////////////////// X X :ta <name> | Search in the tags file where <name> is X | defined (file, line), and go to it. X ^] | Use the name under the cursor in a `:ta' command. X :[x,y]g/<string>/<cmd> | Search globally [from line x to y] for <string> X | and execute the `ex' <cmd> on each occurrence. X :[x,y]v/<string>/<cmd> | Execute <cmd> on the lines that don't match. X X /////////////////// X / undoing changes / X /////////////////// X X u | Undo the latest change. X U | Undo all changes on a line, while not having X | moved off it (unfortunately). X :q! | Quit vi without writing. X :e! | Re-edit a messed-up file. X X /////////////////////////////////// X / appending text (end with <esc>) / X /////////////////////////////////// X X * | a | <*> times after the cursor. X * | A | <*> times at the end of line. X * | i | <*> times before the cursor (insert). X * | I | <*> times before the first CHAR of the line X * | o | On a new line below the current (open). X | The count is only useful on a slow terminal. X * | O | On a new line above the current. X | The count is only useful on a slow terminal. X * | ><move> | Shift the lines described by <*><move> one X | shiftwidth to the right (layout!). X * | >> | Shift <*> lines one shiftwidth to the right. X * | ["<a-z1-9>]p | Put the contents of the (default undo) buffer X | <*> times after the cursor. X | A buffer containing lines is put only once, X | below the current line. X * | ["<a-z1-9>]P | Put the contents of the (default undo) buffer X | <*> times before the cursor. X | A buffer containing lines is put only once, X | above the current line. X * | . | Repeat previous command <*> times. X | If the last command before a `.' command X | references a numbered buffer, the buffer number X | is incremented first (and the count is ignored): X | X | "1pu.u.u.u.u - `walk through' buffers 1 X | through 5 X | "1P.... - restore them XControl-L X X X X X X ///////////////// X / deleting text / X ///////////////// X X Everything deleted can be stored into a buffer. This is achieved by X putting a `"' and a letter <a-z> before the delete command. The X deleted text will be in the buffer with the used letter. If <A-Z> X is used as buffer name, the adjugate buffer <a-z> will be augmented X instead of overwritten with the text. The undo buffer always X contains the latest change. Buffers <1-9> contain the latest 9 X LINE deletions (`"1' is most recent). X X * | x | Delete <*> chars under and after the cursor. X * | X | <*> chars before the cursor. X * | d<move> | From begin to endpoint of <*><move>. X * | dd | <*> lines. X - | D | The rest of the line. X * | <<move> | Shift the lines described by <*><move> one X | shiftwidth to the left (layout!). X * | << | Shift <*> lines one shiftwidth to the left. X * | . | Repeat latest command <*> times. X X ////////////////////////////////// X / changing text (end with <esc>) / X ////////////////////////////////// X X * | r<char> | Replace <*> chars by <char> - no <esc>. X * | R | Overwrite the rest of the line, X | appending change <*> - 1 times. X * | s | Substitute <*> chars. X * | S | <*> lines. X * | c<move> | Change from begin to endpoint of <*><move>. X * | cc | <*> lines. X * | C | The rest of the line and <*> - 1 next lines. X * | =<move> | If the option `lisp' is set, this command X | will realign the lines described by <*><move> X | as though they had been typed with the option X | `ai' set too. X - | ~ | Switch lower and upper cases. X * | J | Join <*> lines (default 2). X * | . | Repeat latest command <*> times (`J' only once). X - | & | Repeat latest `ex' substitute command, e.g. X | `:s/wrong/good'. X - | :[x,y]s/<p>/<r>/<f>| Substitute (on lines x through y) the pattern X | <p> (default the last pattern) with <r>. Useful X | flags <f> are `g' for `global' (i.e. change every X | non-overlapping occurrence of <p>) and `c' for X | `confirm' (type `y' to confirm a particular X | substitution, else <cr>). Instead of `/' any X | punctuation CHAR unequal to <lf> can be used as X | delimiter. XControl-L X X X X X X /////////////////////////////////// X / substitute replacement patterns / X /////////////////////////////////// X X The basic meta-characters for the replacement pattern are `&' and `~'; X these are given as `\&' and `\~' when nomagic is set. Each instance X of `&' is replaced by the characters which the regular expression X matched. The meta-character `~' stands, in the replacement X pattern, for the defining text of the previous replacement X pattern. Other meta-sequences possible in the replacement pattern X are always introduced by the escaping character `\'. The sequence X `\n' (with `n' in [1-9]) is replaced by the text matched by the X n-th regular subexpression enclosed between `\(' and `\)'. The X sequences `\u' and `\l' cause the immediately following character X in the replacement to be converted to upper- or lower-case X respectively if this character is a letter. The sequences `\U' and X `\L' turn such conversion on, either until `\E' or `\e' is X encountered, or until the end of the replacement pattern. X X ////////////////////////////// X / remembering text (yanking) / X ////////////////////////////// X X With yank commands you can put `"<a-z>' before the command, just as X with delete commands. Otherwise you only copy to the undo buffer. X The use of buffers <a-z> is THE way of copying text to another X file; see the `:e <file>' command. X X * | y<move> | Yank from begin to endpoint of <*><move>. X * | yy | <*> lines. X * | Y | Idem (should be equivalent to `y$' though). X - | m<a-z> | Mark the cursor position with a letter. X X //////////////////////////////////////// X / commands while in append|change mode / X //////////////////////////////////////// X X ^@ | If typed as the first character of the X | insertion, it is replaced with the previous X | text inserted (max. 128 chars), after which X | the insertion is terminated. X ^V | Deprive the next char of its special meaning X | (e.g. <esc>). X ^D | One shiftwidth to the left. X 0^D | Remove all indentation on the current line X | (there must be no other chars on the line). X ^^D | Idem, but it is restored on the next line. X ^T | one shiftwidth to the right X ^H | <erase> | One char back. X ^W | One word back. X <kill> | Back to the begin of the change on the X | current line. X <intr> | like <esc>. XControl-L X X X X X X ///////////////////////////////////////////////// X / writing, editing other files, and quitting vi / X ///////////////////////////////////////////////// X X In `:' `ex' commands `%' denotes the current file, `#' is a synonym for X the alternate file (which normally is the previous file). X Marks can be used for line numbers too: '<a-z>. X In the `:w'|`:f'|`:cd'|`:e'|`:n' commands shell meta-characters can be X used. X X :q | Quit vi, unless the buffer has been changed. X :q! | Quit vi without writing. X ^Z | Suspend vi. X :w | Write the file. X :w <name> | Write to the file <name>. X :w >> <name> | Append the buffer to the file <name>. X :w! <name> | Overwrite the file <name>. X :x,y w <name> | Write lines x through y to the file <name>. X :wq | Write the file and quit vi; some versions quit X | even if the write was unsuccessful! X | Use `ZZ' instead. X ZZ | Write if the buffer has been changed, and X | quit vi. If you have invoked vi with the `-r' X | option, you'd better write the file X | explicitly (`w' or `w!'), or quit the X | editor explicitly (`q!') if you don't want X | to overwrite the file - some versions of vi X | don't handle the `recover' option very well. X :x [<file>] | Idem [but write to <file>]. X :x! [<file>] | `:w![<file>]' and `:q'. X :pre | Preserve the file - the buffer is saved as if X | the system had just crashed; for emergencies, X | when a `:w' command has failed and you don't X | know how to save your work (see `vi -r'). X :f <name> | Set the current filename to <name>. X :cd [<dir>] | Set the working directory to <dir> X | (default home directory). X :cd! [<dir>] | Idem, but don't save changes. X :e [+<cmd>] <file> | Edit another file without quitting vi - the X | buffers are not changed (except the undo X | buffer), so text can be copied from one file to X | another this way. [Execute the `ex' command X | <cmd> (default `$') when the new file has been X | read into the buffer.] <cmd> must contain no X | <sp> or <ht>. See `vi startup'. X :e! [+<cmd>] <file> | Idem, without writing the current buffer. X ^^ | Edit the alternate (normally the previous) file. X :rew | Rewind the argument list, edit the first file. X :rew! | Idem, without writing the current buffer. X :n [+<cmd>] [<files>] | Edit next file or specify a new argument list. X :n! [+<cmd>] [<files>] | Idem, without writing the current buffer. X :args | Give the argument list, with the current file X | between `[' and `]'. XControl-L X X X X X X //////////////////// X / display commands / X //////////////////// X X ^G | Give file name, status, current line number X | and relative position. X ^L | Refresh the screen (sometimes `^P' or `^R'). X ^R | Sometimes vi replaces a deleted line by a `@', X | to be deleted by `^R' (see option `redraw'). X [*]^E | Expose <*> more lines at bottom, cursor X | stays put (if possible). X [*]^Y | Expose <*> more lines at top, cursor X | stays put (if possible). X [*]^D | Scroll <*> lines downward X | (default the number of the previous scroll; X | initialization: half a page). X [*]^U | Scroll <*> lines upward X | (default the number of the previous scroll; X | initialization: half a page). X [*]^F | <*> pages forward. X [*]^B | <*> pages backward (in older versions `^B' only X | works without count). X X If in the next commands the field <wi> is present, the windowsize X will change to <wi>. The window will always be displayed at the X bottom of the screen. X X [*]z[wi]<cr> | Put line <*> at the top of the window X | (default the current line). X [*]z[wi]+ | Put line <*> at the top of the window X | (default the first line of the next page). X [*]z[wi]- | Put line <*> at the bottom of the window X | (default the current line). X [*]z[wi]. | Put line <*> in the centre of the window X | (default the current line). XControl-L X X X X X X //////////////////////////// X / mapping and abbreviation / X //////////////////////////// X X When mapping take a look at the options `to' and `remap' (below). X X :map <string> <seq> | <string> is interpreted as <seq>, e.g. X | `:map ^C :!cc %^V<cr>' to compile from within vi X | (vi replaces `%' with the current file name). X :map | Show all mappings. X :unmap <string> | Deprive <string> of its mapping. When vi X | complains about non-mapped macros (whereas no X | typos have been made), first do something like X | `:map <string> Z', followed by `:unmap <string>' X | (`Z' must not be a macro itself), or switch to X | `ex' mode first with `Q'. X :map! <string> <seq> | Mapping in append mode, e.g. X | `:map! \be begin^V<cr>end;^V<esc>O<ht>'. X | When <string> is preceded by `^V', no X | mapping is done. X :map! | Show all append mode mappings. X :unmap! <string> | Deprive <string> of its mapping (see `:unmap'). X :ab <string> <seq> | Whenever in append mode <string> is preceded and X | followed by a breakpoint (e.g. <sp> or `,'), it X | is interpreted as <seq>, e.g. `:ab p procedure'. X | A `^V' immediately following <string> inhibits X | expansion. X :ab | Show all abbreviations. X :unab <string> | Do not consider <string> an abbreviation X | anymore (see `:unmap'). X @<a-z> | Consider the contents of the named register a X | command, e.g.: X | o0^D:s/wrong/good/<esc>"zdd X | Explanation: X | o - open a new line X | 0^D - remove indentation X | :s/wrong/good/ - this input text is an X | `ex' substitute command X | <esc> - finish the input X | "zdd - delete the line just X | created into register `z' X | Now you can type `@z' to substitute `wrong' X | with `good' on the current line. X @@ | Repeat last register command. XControl-L X X X X X X ///////////////////////////// X / switch and shell commands / X ///////////////////////////// X X Q | ^\ | <intr><intr> | Switch from vi to `ex'. X : | An `ex' command can be given. X :vi | Switch from `ex' to vi. X :sh | Execute a subshell, back to vi by `^D'. X :[x,y]!<cmd> | Execute a shell <cmd> [on lines x through y; X | these lines will serve as input for <cmd> and X | will be replaced by its standard output]. X :[x,y]!! [<args>] | Repeat last shell command [and append <args>]. X :[x,y]!<cmd> ! [<args>] | Use the previous command (the second `!') in a X | new command. X [*]!<move><cmd> | The shell executes <cmd>, with as standard X | input the lines described by <*><move>, X | next the standard output replaces those lines X | (think of `cb', `sort', `nroff', etc.). X [*]!<move>!<args> | Append <args> to the last <cmd> and execute it, X | using the lines described by the current X | <*><move>. X [*]!!<cmd> | Give <*> lines as standard input to the X | shell <cmd>, next let the standard output X | replace those lines. X [*]!!! [<args>] | Use the previous <cmd> [and append <args> to it]. X :x,y w !<cmd> | Let lines x to y be standard input for <cmd> X | (notice the <sp> between `w' and `!'). X :r!<cmd> | Put the output of <cmd> onto a new line. X :r <name> | Read the file <name> into the buffer. XControl-L X X X X X X ////////////// X / vi startup / X ////////////// X X vi [<files>] | Edit the files, start with the first page of X | the first file. X X The editor can be initialized by the shell variable `EXINIT', which X looks like: X X EXINIT='<cmd>|<cmd>|...' X <cmd>: set options X map ... X ab ... X export EXINIT (in the Bourne shell) X X However, the list of initializations can also be put into a file. X If this file is located in your home directory, and is named `.exrc' X AND the variable `EXINIT' is NOT set, the list will be executed X automatically at startup time. However, vi will always execute the X contents of a `.exrc' in the current directory, if you own the file. X Else you have to give the execute command yourself: X X :source file X or X :so file X X On-line initializations can be given with `vi +<cmd> file', e.g.: X X vi +x file | The cursor will immediately jump to line x X | (default last line). X vi +/<string> file | ~ to the first occurrence of <string>. X X You can start at a particular tag with: X X vi -t <tag> | Start in the right file in the right place. X X Sometimes (e.g. if the system crashed while you were editing) it is X possible to recover files lost in the editor by `vi -r file'. If X you just want to view a file by using vi, and you want to avoid any X change, instead of vi you can use the `view' or `vi -R' command: X the option `readonly' will be set automatically (with `:w!' you can X override this option). XControl-L X X X X X X ////////////////////////////// X / the most important options / X ////////////////////////////// X X ai | autoindent - In append mode after a <cr> the X | cursor will move directly below the first X | CHAR on the previous line. However, if the X | option `lisp' is set, the cursor will align X | at the first argument to the last open list. X aw | autowrite - Write at every shell escape. X | (useful when compiling from within vi) X dir=<string> | directory - The directory for vi to make X | temporary files (default `/tmp'). X eb | errorbells - Beeps when you goof X | (not on every terminal). X ic | ignorecase - No distinction between upper and X | lower cases when searching. X lisp | Redefine the following commands: X | `(', `)' - move backward (forward) over X | S-expressions X | `{', `}' - idem, but don't stop at atoms X | `[[', `]]' - go to previous (next) line X | beginning with a `(' X | See option `ai'. X list | <lf> is shown as `$', <ht> as `^I'. X magic | If this option is set (default), the chars `.', X | `[' and `*' have special meanings within search X | and `ex' substitute commands. To deprive such a X | char of its special function it must be preceded X | by a `\'. If the option is turned off it's just X | the other way around. Meta-chars: X | ^<string> - <string> must begin the line X | <string>$ - <string> must end the line X | . - matches any char X | [a-z] - matches any char in the range X | [<string>] - matches any char in <string> X | [^<string>] - matches any char not in <string> X | <char>* - 0 or more <char>s X | \<<string>\> - <string> must be a word X nu | number - Numbers before the lines. X para=<string> | paragraphs - Every pair of chars in <string> is X | considered a paragraph delimiter nroff macro X | (for `{' and `}'). A <sp> preceded by a `\' X | indicates the previous char is a single letter X | macro. `:set para=P\ bp' introduces `.P' and X | `.bp' as paragraph delimiters. Empty lines and X | section boundaries are paragraph boundaries too. X redraw | The screen remains up to date. X remap | If on (default), macros are repeatedly X | expanded until they are unchanged. X | Example: if `o' is mapped to `A', and `A' X | is mapped to `I', then `o' will map to `I' X | if `remap' is set, else it will map to `A'. X report=<*> | Vi reports whenever e.g. a delete X | or yank command affects <*> or more lines. X ro | readonly - The file is not to be changed. X | However, `:w!' will override this option. XControl-L X X X X X X sect=<string> | sections - Gives the section delimiters (for `[[' X | and `]]'); see option `para'. A `{' beginning a X | line also starts a section (as in C functions). X sh=<string> | shell - The program to be used for shell escapes X | (default `$SHELL' (default `/bin/sh')). X sw=<*> | shiftwidth - Gives the shiftwidth (default 8 X | positions). X sm | showmatch - Whenever you append a `)', vi shows X | its match if it's on the same page; also with X | `{' and `}'. If there's no match, vi will beep. X terse | Short error messages. X to | timeout - If this option is set, append mode X | mappings will be interpreted only if they're X | typed fast enough. X ts=<*> | tabstop - The length of a <ht>; warning: this is X | only IN the editor, outside of it <ht>s have X | their normal length (default 8 positions). X wa | writeany - No checks when writing (dangerous). X warn | Warn you when you try to quit without writing. X wi=<*> | window - The default number of lines vi shows. X wm=<*> | wrapmargin - In append mode vi automatically X | puts a <lf> whenever there is a <sp> or <ht> X | within <wm> columns from the right margin. X ws | wrapscan - When searching, the end is X | considered `stuck' to the begin of the file. X X :set <option> | Turn <option> on. X :set no<option> | Turn <option> off. X :set <option>=<value> | Set <option> to <value>. X :set | Show all non-default options and their values. X :set <option>? | Show <option>'s value. X :set all | Show all options and their values. X X X ///////////////// X / contributions / X ///////////////// X X Maarten Litmaath <maart@cs.vu.nl> X Rich Salz <rsalz@bbn.com> X Eamonn McManus <emcmanus@cs.tcd.ie> X Diomidis Spinellis <diomidis%ecrcvax.uucp@pyramid.pyramid.com> X Blair P. Houghton <bph@buengc.bu.edu> X Rusty Haddock <{uunet,att,rutgers}!mimsy.umd.edu!fe2o3!rusty> X Panos Tsirigotis <panos@boulder.colorado.edu> X David J. MacKenzie <djm@wam.umd.edu> X Kevin Carothers <kevin@ttidca.tti.com> X Dan Mercer <mercer@ncrcce.StPaul.NCR.COM> X X Patchlevel: 6 + END-OF-FILE vi.ref.6 chmod 'u=rw,g=r,o=r' 'vi.ref.6' set `wc -c 'vi.ref.6'` count=$1 case $count in 30846) :;; *) echo 'Bad character count in ''vi.ref.6' >&2 echo 'Count should be 30846' >&2 esac exit 0 -- Did Andy Tanenbaum get his programming |Maarten Litmaath @ VU Amsterdam: instruction from a Cereal box? (Sam McCrea)|maart@cs.vu.nl, mcvax!botter!maart ----------------------------- From: "Dr. T. Andrews" <tanner@cdis-1.uucp> Subject: Re: Reversing a file? Date: 5 Oct 89 15:33:47 GMT To: info-unix@sem.brl.mil itkin@mrspoc.Transact.COM (Steven M. List) writes: ) echo "g/./.m0\nw $OUTPUT\nq" | ex $INPUT ) :g/./.m0 Very clever, but does not deal effectively with zero-lentgh lines. In "vi", try the following (similar change for echo command above) :g/^/.m0 -- He cuts half of passenger service | {bpa,uunet}!cdin-1!cdis-1!tanner Mulroney: "cold froze our brains" | {attctc gatech!uflorida}!ki4pv!cdis-1!tanner ----------------------------- End of INFO-UNIX Digest ***********************
postmaster@ddnvx2.afwl.af.mil (SMTP MAILER) (01/19/90)
----Mail status follows---- Have been unable to send your mail to <declerck@sun4b.afwl.af.mil>, will keep trying for a total of three days. At that time your mail will be returned. ----Transcript of message follows---- Date: 18 Jan 90 03:59:00 MST From: info-unix@BRL.MIL Subject: INFO-UNIX Digest V9#049 To: "declerck" <declerck@sun4b.afwl.af.mil> Return-Path: <info-unix-request@sem.brl.mil> Received: from SEM.BRL.MIL by ddnvx2.afwl.af.mil with SMTP ; Thu, 18 Jan 90 03:56:59 MST Received: from SEM.BRL.MIL by SEM.brl.MIL id ab08556; 18 Jan 90 3:05 EST Received: from sem.brl.mil by SEM.BRL.MIL id aa08539; 18 Jan 90 2:46 EST Date: Thu, 18 Jan 90 02:46:15 EST From: The Moderator (Mike Muuss) <Info-Unix-Request@BRL.MIL> To: INFO-UNIX@BRL.MIL Reply-To: INFO-UNIX@BRL.MIL Subject: INFO-UNIX Digest V9#049 Message-ID: <9001180246.aa08539@SEM.BRL.MIL> INFO-UNIX Digest Thu, 18 Jan 1990 V9#049 Today's Topics: sys/resource.h Vi Reference - version 6 help on MICROPOLIS 1568 HD Re: YACC question Re: /bin/sh Re: ps -c num bug or feature ? Re: Is there an EDT editor for Unix systems? Re: use of set in a shell script Re: RPC numbers X25 summarize Re: Problem with 'find' Reply to question on 'find p* ...' using RCS with make Re: using RCS with make Re: async I/O (was: Is there a select()-like call for message queues?) Re: async I/O Re: async I/O (was: Is there a select()-like call for message queues?) Re: async I/O The trouble with fork() (Re: IBM PC prehistory) Re: The trouble with fork() (Re: IBM PC prehistory) Unix System V link Re: Unix System V link Re: help Re: making compressed backups Re: Robust Mounts timed question Re: How to do a non-blocking write of more than one char? h files that include h files Re: h files that include h files xDBM sources Re: xDBM sources getting the system's domain name in a C program csh variable manipulation Re: #! troubles csh and signal handling... problem with find(1)? Re: Shared libraries Re: Compress problem Printcap & filters for Genicom 3180-3404 Series Printers Hex input to awk Wanted: Info. on zic Passing variables to gawk panic: sys pt too small size of a file SUMMARY: problem with find(1) Unix Operating System on an PC XT. How does a process use memory??? Shadow passwds breaks programs with pw_stayopen? ----------------------------------------------------------------- From: Michael Richardson <michael@fts1.uucp> Subject: sys/resource.h Keywords: Porting to System V3.2 Date: 10 Jan 90 01:28:42 GMT To: info-unix@sem.brl.mil On occasion, I have attempted to port BSD programs to ICS 386/ix. Occasionally, I manage to do it :-) Very often, however, I run into sys/resource.h as a major problem. This usually has to do with wait3() and the like in BSD. I've read the man pages on a Sun I have access to, and understand it, however that seldom helps to decide what to do about the code... I know SunOS/4.3 _far_ better than I know SysV. (I will be _very_ happy to see V.4) Can anyone suggest any general recommendations for porting things that involve sys/resource.h? Thanks. -- :!mcr!: Michael C. Richardson HOME: mcr@julie.UUCP SCHOOL: mcr@doe.carleton.ca WORK: michael@fts1.UUCP I never liked staying in one place too long, but this is getting silly... ----------------------------- From: Maarten Litmaath <maart@cs.vu.nl> Subject: Vi Reference - version 6 Date: 15 Jan 90 06:49:50 GMT To: info-unix@sem.brl.mil It'll never end. Many Minor Modifications, some additions. A patch would be twice as big. Still `old' format (what happened to you, Kevin?). Enjoy! ----------------------------- From: Lin Chen <lin@cdin-1.uucp> Subject: help on MICROPOLIS 1568 HD Keywords: 1568 MICROPOLIS SCO ADAPTEC HD Date: 15 Jan 90 23:08:19 GMT To: info-unix@sem.brl.mil Hi Netters: We have a problem that we need some help with : First our system configuration : AMI386/25 running SCO XENIX2.3.1 and we have tried SCO XENIX 2.3.2 GT and AT with a MICROPOLIS Model 1568 which is 660 MB HD. Some drive specifics : Cylinder : 1630; Head : 15; Sector : 54. The hard drive controller is (ADAPTEC) ACB-2322B-8. The drive gets through Debug ( using G=C800:5 ) with no problems. It only when we go to install SCO XENIX that we can not get through the bad track routine with either destructive or non-destructive using thorough or quick options. We have talked to MICROPOLIS, ADAPTEC and SCO and have been unsuccessful with their suggestions. We would appreciate any ideas and passed experiences with this configuration. We will summarize if there is enough interest. -- Lin Chen {uunet,bpa}!cdin-1!lin lin@cdin-1.uu.net CompuData Inc., Philadelphia PA ----------------------------- From: Evan Bigall <evan@plx.uucp> Subject: Re: YACC question Date: 16 Jan 90 00:31:28 GMT To: info-unix@sem.brl.mil > > expr: mulexpr PLUS mulexpr > | mulexpr MINUS mulexpr > >It's very straightforward; the yylex() routine must be written to return >the constant PLUS when it encounters a '+' in the input, and the >constant MINUS when it encounters a '-' in the input. However, Yacc >allows you to rewrite the above fragment as > > expr: mulexpr '+' mulexpr > | mulexpr '-' mulexpr > >My question is, where does Yacc find the '+' and the '-' characters? >Apparently they're not gotten via a call to yylex(). Does Yacc simply >do a getchar()? Quoting from the yacc section of my sys5.2 "Suport Tool Guide": } The rules section is made up of one or more grammar rules. A grammar }rule has the form } }A : BODY ; } }where "A" represents a nonterminal name, and "BODY" represents a sequence of }zero or more names and LITERALS {my emphasis}. The colon and the semicolon }are yacc punctuation. {later it says:} }A literal consists of a character enclosed in single quotes ('). As in C }language, the backslash (\) is an escape character within literals.... Really all that is going on here is that yacc is using the value of the character literal as the token number. This is why the yacc generated token numbers start at 257 (on machines with ""normal"" char sets). The standard way to represent this as a lex rule is: . return(*yytext); to return a literal for all charcters not recognized by another rule. Evan -- Evan Bigall, Plexus Software, Santa Clara CA (408)982-4840 ...!sun!plx!evan "I barely have the authority to speak for myself, certainly not anybody else" ----------------------------- From: Maarten Litmaath <maart@cs.vu.nl> Subject: Re: /bin/sh Date: 16 Jan 90 08:00:39 GMT To: info-unix@sem.brl.mil In article <21838@mimsy.umd.edu>, chris@mimsy.umd.edu (Chris Torek) writes: \... \ $ eval echo $"$#" \... \but for a small problem with sh argument syntax: \ \ $ set a b c d e f g h i j k l \ $ echo $11 \ a1 A ridiculous feature which should have been fixed long ago... Similar: exec 10< foo 11> bar -- Q: "How do I convert UNIX files to IXUN format?" A: "rev | dd conv=swab." | Maarten Litmaath @ VU Amsterdam: maart@cs.vu.nl, uunet!mcsun!botter!maart ----------------------------- From: Hans Buurman <hans@duttnph.tudelft.nl> Subject: Re: ps -c num bug or feature ? Date: 16 Jan 90 10:15:12 GMT Sender: tnphnws@dutrun.uucp To: info-unix@sem.brl.mil In article <1990Jan15.094339.4254@athena.mit.edu> jik@athena.mit.edu (Jonathan I. Kamens) writes: > >In article <1072@dutrun.UUCP>, hans@duttnph.tudelft.nl (Hans Buurman) writes: >> >> I don't understand the following behaviour of ps (SunOs 4.0.1): >> >> hans55> ps -c 23706 >> ps: cannot open 23706: No such file or directory > The manual also says (at the top): > > SYNOPSIS > ps [ acegklnstuvwxU# ] > >This means that the pid number should be part of the first argument >passed to ps, not in a second argument. In other words, you should have typed: > > ps -c23706 Er, yes and no. You are quite right, ps -c23706 works perfectly. However, my SunOs 4.0.1 manual says: SYNOPSIS ps [ -acCegklnrStuvwxU ] [ num ] [ kernel_name ] [ c_dump_file ] [ swap_file ] Sun Release 4.0 Last change: 14 January 1988 1 So obviously, the manual is incorrect. You go on to explain why exactly we get this error message. Your explanation is no doubt correct, but again, you quote from a different manual. Which manual are you using ? Thanks for the reply, Hans >Jonathan Kamens USnail: >MIT Project Athena 11 Ashford Terrace >jik@Athena.MIT.EDU Allston, MA 02134 >Office: 617-253-8495 Home: 617-782-0710 ======================================================================== Hans Buurman | hans@duttnph.tudelft.nl | hans@duttnph.UUCP Pattern Recognition Group | 31-(0)15-78 46 94 | Faculty of Applied Physics | Delft University of Technology ----------------------------- From: "Jonathan I. Kamens" <jik@athena.mit.edu> Subject: Re: ps -c num bug or feature ? Date: 16 Jan 90 17:03:04 GMT Sender: News system <news@athena.mit.edu> To: info-unix@sem.brl.mil In article <1073@dutrun.UUCP>, hans@duttnph.tudelft.nl (Hans Buurman) writes: > You go on to explain why exactly we get this error message. > Your explanation is no doubt correct, but again, you quote from > a different manual. Which manual are you using ? BSD 4.3. I should have mentioned that.... Jonathan Kamens USnail: MIT Project Athena 11 Ashford Terrace jik@Athena.MIT.EDU Allston, MA 02134 Office: 617-253-8495 Home: 617-782-0710 ----------------------------- From: ekuns@zodiac.rutgers.edu Subject: Re: Is there an EDT editor for Unix systems? Date: 16 Jan 90 13:51:52 GMT To: info-unix@sem.brl.mil In article <1990Jan12.035136.2081@world.std.com>, madd@world.std.com (jim frost) writes: > lss@babcock.cerc.wvu.wvnet.edu (Linda S. Saus) writes: >>From article <680@dftsrv.gsfc.nasa.gov>, by packer@chrpserv.gsfc.nasa.gov (Charles Packer): >>> Does there exist a screen-oriented editor that runs >>> under Unix on a Sun, for example, but looks to the user >>> like the VAX-VMS editor EDT? One product I haven't seen mentioned is EDT8, by a company called acceler8. I've been using it for a while, and it seems quite close to EDT. (I haven't run into a difference yet, except that on some systems, you can't use ^Z to get out of screen mode. But that's probably my ineptness at figuring out stty!) This company also sells a product DCL8, a VAX/VMS DCL-like shell for UNIX, and LIB8, to emulate the VAX/VMS run-time libraries. I haven't used either of the two myself. -- /--------------+----------------------------------+--------------------------\ | | bitnet: EKuns@zodiac | 2005 Tall Oaks Drive #2A | | Eddie Kuns | domain: EKuns@zodiac.rutgers.edu | Aurora, IL 60505 | | | Delphi: EddieKuns | (708) 820-3943 | +--------------+----------------------------------+--------------------------+ | Note: You can subsitute Cancer or Pisces for Zodiac if you have problems. | \----------------------------------------------------------------------------/ ----------------------------- From: Geoff Clare <gwc@root.co.uk> Subject: Re: use of set in a shell script Date: 16 Jan 90 14:06:32 GMT To: info-unix@sem.brl.mil In article <5060@solo9.cs.vu.nl> maart@cs.vu.nl (Maarten Litmaath) writes: >optc=0 >optv= > >for i >do > case $i in > -*) > optc=`expr $optc + 1` > eval optv$optc='"$i"' > optv="$optv \"\$optv$optc\"" > ;; > *) > # you get the idea > esac >done > >eval set $optv # restore the options EXACTLY A good attempt, Maarten, but there are a couple of big problems here. Firstly, the use of "expr" will be extremely slow for shells which don't have "expr" built in (virtually all Bourne shells, I think). There's no need to use a separate variable for each argument, anyway. Secondly, the final "set" command will not work correctly. Suppose at the start of the script $1 contains "-x". This will end up as a "set -x" command, which will turn on tracing mode in the shell, not place "-x" in $1. With some shells you can use "--" in a "set" command to mark the end of the options, but a dummy first argument is more portable. Try this modified version: optv= for i do case $i in -*) optv="$optv '$i'" ;; *) # you get the idea esac done eval set X "$optv"; shift # restore the options EXACTLY -- Geoff Clare, UniSoft Limited, Saunderson House, Hayne Street, London EC1A 9HH gwc@root.co.uk (Dumb mailers: ...!uunet!root.co.uk!gwc) Tel: +44-1-315-6600 ----------------------------- From: Stephen Vinoski <vinoski@apollo.hp.com> Subject: Re: RPC numbers Keywords: RPC SUN Problems Date: 16 Jan 90 15:33:00 GMT Sender: root@apollo.hp.com To: info-unix@sem.brl.mil In article <148@ingreur.UUCP> pve@ingreur.UUCP (new user) writes: >I am trying to get a RPC number registered. I have tryed to >email, send letters and contacted local SUN offices, but they either >they did not respond or they refer to the RPC Administrator as mentioned >in the SUN manuals.(but she/he is not responding !!!!!!) > >I would really appreciate any suggestions or tips on how to get it >done. (Maybe someone from SUN is reading this ?? ) Too bad you're not using Apollo's NCS. With it, there is no need to do this ridiculous activity since NCS includes a program that generates Unique Universal Identifiers (UUIDs) which are used to identify RPCs and remote objects. From "Network Computing Architecture", Lisa Zahn, et. al., Prentice-Hall, 1990, ISBN 0-13-611674-4, page 11: "In addition, UUIDs can be generated anywhere without the need for prior contact with some other agent, for example, contact with a special server on the network, or a human representative of a company that hands out identifiers." Pretty much hits the nail on the head, huh? NCS is available for Suns, among other machines. -steve | Steve Vinoski | Hewlett-Packard Apollo Div. | ARPA: vinoski@apollo.com | | (508)256-6600 x5904 | Chelmsford, MA 01824 | UUCP: ...!apollo!vinoski | ----------------------------- From: Alfredo Villalobos <avq@goya.dit.upm.es> Subject: X25 summarize Date: 16 Jan 90 16:15:09 GMT Sender: avq@goya.dit.upm.es Followup-To: comp.unix.i386 To: info-unix@sem.brl.mil X.25 on UNIX Sys V Rel. 3.2 All products are available for PC/AT bus based 386 machines with UNIX/XENIX Operating System. ------------ netCS Informationstechnik GmbH Ahornstrasse 1-2 D-1000 Berlin 30 West Germany Phone: +49 30 244237; Fax: +49 30 243800 pengo@tmpmbx.UUCP <Hans Huebner> pengo@garp.mit.edu - Intelligent Adapter Card (currently three different cards) that provides everything up to ISO level 3. - X.3,X.28, X.29 internal PAD support. - programmer's library to support custom applications. --------------- Systems Strategies Inc. USA, Phone 212 279 8400 X.25 intelligent board and Comlink Communications Software. --------------------- Symicron Computer Communications Charles House 35 Widmore Road Bromley Kent BR1 1RW, England Phone: 01-460-2238, Fax: 01-290-1669 - Product DTSX PC/AT card (up to 64 kbps) - soft STS (Symicron Telematics Software) - UNIX/XENIX device drivers - X.3, X.28, X.29 internal PAD support (release not yet available) - programmer's library --------------------- The Software Group Limited 2 Director Court, Suite 201 Woodbridge, Canada L4L 3Z5 Phone: (416) 8560238 Fax: (416) 8560242 uunet!tsgfred!derek <Derek Vair> - Product NETCOM-II includes both Intelligent Board (up to 64 kbps) and software. - X.3, X.28, X.29 internal PAD support (T-PAD,H-PAD and U-PAD) - programmer's library ---------------------- RETIX 2644 30th Street Santa Monica, CA 90405-3009 Phone: (213) 3992200 rutgers!retix!mark <Mark Hoy> - X.25 card (up to 19.200 kbps) for UNIX on 386 systems. ----------------------------- From: Mark Runyan <runyan@hpirs.hp.com> Subject: Re: Problem with 'find' Date: 16 Jan 90 17:11:24 GMT To: info-unix@sem.brl.mil >/ mcd@mcdd1.UUCP (Martin Dew) / 6:35 am Jan 11, 1990 / >When I execute the command line : > > find . -name t.c -print > >I get the response : > > find cannot execute 'pwd' > >'Pwd' exists and is available on typing 'pwd' on its own. > >Any ideas why I am having problems ????????????? May depend on your shell. A long time ago, I noticed that csh does it's own pwd. If /bin/pwd exists, try executing it as "/bin/pwd" and see if you get results. If not, then it may be that the directory you are in has permissions that keeps pwd from finding out where you are. Another thing to examine: Are you on an NFS mount? If so, you may find that some programs know what to do to get pwd while others fail. Programs that use libPW curdir() function may have some difficulty if that function wasn't updated to understand NFS or other remote mounting systems. If all of the above doesn't help, then provide more information, please. Mark Runyan ----------------------------- From: "Jan B. Andersen" <jba@harald.ruc.dk> Subject: Reply to question on 'find p* ...' Date: 16 Jan 90 17:32:54 GMT To: info-unix@sem.brl.mil My reply (by mail) bounced with 554 usdtsg.UUCP!musson... Host usdtsg not known within the UUCP domain >when I do a 'find p* -mtime +1 -print' in a directory with a large number of >files starting with 'p', I get find: too many arguments. The first argument to find(1) must the starting directory. Assuming that you want to find *only* those files starting with 'p' in the current directory use the command % find . -name 'p*' -mtime..... ----------------------------- From: dw block x-4621 <dwb@hare.udev.cdc.com> Subject: using RCS with make Date: 16 Jan 90 17:39:54 GMT Sender: news@shamash.cdc.com Followup-To: comp.unix.questions To: info-unix@sem.brl.mil Is there some way to get the make utility to understand RCS files? I would like to have make know how to create a .f file from a .f,v RCS file. I have heard that the latest version of make from AT&T has this capability. If this is true, any idea when it will be available on MIPS? ------------------------------------------------------------ Dave Block E-mail: gwk@hare.udev.cdc.com Control Data Corp. AT&T: (612) 482-4621 ----------------------------- From: ilan343@violet.berkeley.edu Subject: Re: using RCS with make Date: 16 Jan 90 21:22:09 GMT Sender: "USENET Administrator;;;;ZU44" <usenet@agate.berkeley.edu> To: info-unix@sem.brl.mil In article <15093@shamash.cdc.com> dwb@hare.udev.cdc.com (dw block x-4621) writes: >Is there some way to get the make utility to understand RCS files? I would >like to have make know how to create a .f file from a .f,v RCS file. > I had the same problem a while ago. The easiest way to fix it was to install GNUmake. ----------------------------- From: Peter da Silva <peter@ficc.uu.net> Subject: Re: async I/O (was: Is there a select()-like call for message queues?) Date: 16 Jan 90 17:44:53 GMT To: info-unix@sem.brl.mil In article <11956@smoke.BRL.MIL> gwyn@brl.arpa (Doug Gwyn) writes: > One thing that was appreciated in the computer science research community > during the 1970s was that forcing applications to explicitly deal with > asynchronism had been causing numerous reliability problems. First, a nitpick. By 1974 UNIX was basically in its current form, and its design goals must have been established earlier than that. But that's just a nitpick. Secondly, I'm not suggesting that applications be forced to explicitly deal with asynchronism. I just believe that since the real world is asynchronous you should be able to deal with it. Also, the event-loop construct has considerable success in the real world for dealing with asynchronous events. I've worked in the process control industry for the past 10 years, and UNIX has effectively zero penetration simply because it doesn't allow for processes to handle asynchronous events. > UNIX loosely followed the CSP notion, wherein individual processes are > strictly sequential but can communicate with concurrent processes to > achieve controlled asynchronity. The UNIX kernel manages the actual > asynchronous operations and converts them into the per-process sequential > I/O model. Unfortunately, UNIX doesn't support a sufficiently fine-grained process structure to allow this to be generally used. Systems like Mach do, but they do it by pretty much abandoning the UNIX model. Or you can implement a fineer grained process structure within a UNIX process, but to do that effectively you need asynchronous I/O. > Rob Pike has shown in an article in a recent issue of Computing Systems > how the CSP model can be applied to graphical windowing environments, > with the result of dramatically simplifying the design of applications > in such environments. I'm sure it can. But not under UNIX as it exists, and not under any extension of UNIX that I've seen that still remains close to the source. -- _--_|\ Peter da Silva. +1 713 274 5180. <peter@ficc.uu.net>. / \ \_.--._/ Xenix Support -- it's not just a job, it's an adventure! v "Have you hugged your wolf today?" `-_-' ----------------------------- From: brnstnd@stealth.acf.nyu.edu Subject: Re: async I/O Date: 17 Jan 90 08:09:10 GMT X-Original-Subject: Is there a select()-like call for message queues? To: info-unix@sem.brl.mil I very much agree with Peter. The basic I/O calls should be asynchronous: aread(), awrite(), and astatus(). aschedwait() and asyncwait() should wait for scheduling and synchronization respectively; both should only be special cases of a single await() call, with different semantics for different devices and file types. Then my multitee program would be easy to deal with, along with a host of related problems. In article <CU318Y5xds13@ficc.uu.net> peter@ficc.uu.net (Peter da Silva) writes: > Secondly, I'm not suggesting that applications be forced to explicitly > deal with asynchronism. Exactly. read() and write() would be short library routines. > I just believe that since the real world is > asynchronous you should be able to deal with it. Yup, and select() is only half a solution. (select() and poll() would be forms of the more logically named await().) ---Dan ----------------------------- From: Doug Gwyn <gwyn@smoke.brl.mil> Subject: Re: async I/O (was: Is there a select()-like call for message queues?) Date: 17 Jan 90 14:25:57 GMT To: info-unix@sem.brl.mil In article <CU318Y5xds13@ficc.uu.net> peter@ficc.uu.net (Peter da Silva) writes: >First, a nitpick. By 1974 UNIX was basically in its current form, and its >design goals must have been established earlier than that. But that's just >a nitpick. Yes, Ken Thompson was thinking about these issues too, as far back as 1969 for sure and probably well before that. >Secondly, I'm not suggesting that applications be forced to explicitly >deal with asynchronism. I just believe that since the real world is >asynchronous you should be able to deal with it. I would rather have it under control than have to deal with it ad lib. >Also, the event-loop construct has considerable success in the real world >for dealing with asynchronous events. Ha! Practically everybody I know who has had to program event loops thinks "there has to be a better way". The fundamental problem with event loops is that it forces the application to maintain state information merely to properly schedule the application's actions. This (tedious and error-prone) bookkeeping is unnecessary when using better methods for handling asynchronism. >Unfortunately, UNIX doesn't support a sufficiently fine-grained process >structure to allow this [CSP] to be generally used. Actually, it does pretty well, but in most implementations its IPC needs improvement. Also, there is no reasonable programming language for exploiting this approach other than the shell language, which is too limited and difficult to use in this area. >I'm sure it can. But not under UNIX as it exists, and not under any >extension of UNIX that I've seen that still remains close to the source. The issue was the best way to extend UNIX to give applications better control over asynchronism. I made suggestions for better methods than forcing processes to deal with awrite() etc. ----------------------------- From: Peter da Silva <peter@ficc.uu.net> Subject: Re: async I/O (was: Is there a select()-like call for message queues?) Date: 17 Jan 90 23:05:30 GMT To: info-unix@sem.brl.mil In article <11968@smoke.BRL.MIL> gwyn@brl.arpa (Doug Gwyn) writes: > In article <CU318Y5xds13@ficc.uu.net> peter@ficc.uu.net (Peter da Silva) writes: > >I just believe that since the real world is > >asynchronous you should be able to deal with it. > I would rather have it under control than have to deal with it ad lib. > >Also, the event-loop construct has considerable success in the real world > >for dealing with asynchronous events. > Ha! Practically everybody I know who has had to program event loops > thinks "there has to be a better way". You sound like me (see my occasional diatribes against X in comp.windoows.*). However with a conventional programming language it's the only way to do it, unless you go all the way to UNIX processes... and that's too slow. > >Unfortunately, UNIX doesn't support a sufficiently fine-grained process > >structure to allow this [CSP] to be generally used. > Actually, it does pretty well, but in most implementations its IPC needs > improvement. Yes, that's an understatement. Replacing all System V's shm_* calls with something like map_fd() (from Mach) would help. But context switch overhead is still too high for realtime work. > Also, there is no reasonable programming language for > exploiting this approach other than the shell language, which is too > limited and difficult to use in this area. Multithreaded applications are difficult in many languuages, even when the operating system is up to snuff. This is a language problem... > The issue was the best way to extend UNIX to give applications better > control over asynchronism. I made suggestions for better methods than > forcing processes to deal with awrite() etc. First, you keep telling me I'm *forcing* processes to deal with awrite(). I'm not. I'm saying it should be an option. Secondly, you can implement threads on top of asynchronous I/O calls. I've done this for Forth under RSX-11. You have to have an explicit context switch routine, but that simplifies the programming immensely anyway. You just include checks for completed I/O in the swtch() routine. I laid out the outline for such a routine in comp.lang.c some months ago, and at least one person has turned it into a real concurrent "library" for C. *If* UNIX supported await() and friends, then you could efficiently implement a concurrent programming language. In fact, you could use C plus a set of small routines to switch to a new context. But it doesn't. Pity. Your serve. -- _--_|\ Peter da Silva. +1 713 274 5180. <peter@ficc.uu.net>. / \ \_.--._/ Xenix Support -- it's not just a job, it's an adventure! v "Have you hugged your wolf today?" `-_-' ----------------------------- From: Barry Margolin <barmar@think.com> Subject: Re: async I/O Date: 18 Jan 90 06:31:57 GMT Sender: news@think.com To: info-unix@sem.brl.mil In article <20718@stealth.acf.nyu.edu> brnstnd@stealth.acf.nyu.edu (Dan Bernstein) writes: >I very much agree with Peter. The basic I/O calls should be asynchronous: ... >Exactly. read() and write() would be short library routines. Watch out, this is how Multics does it. Remember, Unix is supposed to be a castrated Multics :-) On Multics, the only system call that causes the process to block is hcs_$block, which is similar to select(). All I/O system calls are asynchronous (file access is done using memory mapping and paging, so it isn't included). These are hidden away in library routines (called I/O modules) which implement device-independent, I/O (similar to Unix read(), write(), etc.). Since the underlying mechanism is asynchronous, I/O modules can provide synchronous and asynchronous modes. When doing asynchronous writes, the I/O module returns the count of the number of characters written. The caller can then advance his buffer pointer that many characters into his output buffer, wait for the device to be ready to accept more data, and then try to write the rest of the buffer; this is iterated until the entire buffer is taken. The terminal driver also provides an all-or-nothing interface, for use by applications that write escape sequences (to guarantee that process interrupts don't cause partial escape sequences to be written); this is just like the normal interface, but acts as if the kernel's buffer is full unless it has enough room for the entire string being written (even a normal write call can return "0 characters written", if other processes fill up the kernel buffers before this process gets around to making the write call). -- Barry Margolin, Thinking Machines Corp. barmar@think.com {uunet,harvard}!think!barmar ----------------------------- From: Peter da Silva <peter@ficc.uu.net> Subject: The trouble with fork() (Re: IBM PC prehistory) Date: 16 Jan 90 19:10:15 GMT Followup-To: comp.misc To: info-unix@sem.brl.mil Fork() is an elegant concept, but as has been seen it leads to problems implementing UNIX on a system without an MMU, or implementing a UNIX lookalike on top of a non-UNIX O/S. It's possible, but expensive. Wouldn't it be nice if there was a sanctioned P1003 subset that replaced fork() with a combined fork()/exec() call (spawn?). Or just an addition of spawn to the standard as an alternative process creation mechanism: This would radically improve the performance of non-UNIX POSIX systems, without compromising the capability of the standard... -- _--_|\ Peter da Silva. +1 713 274 5180. <peter@ficc.uu.net>. / \ \_.--._/ Xenix Support -- it's not just a job, it's an adventure! v "Have you hugged your wolf today?" `-_-' ----------------------------- From: Doug Gwyn <gwyn@smoke.brl.mil> Subject: Re: The trouble with fork() (Re: IBM PC prehistory) Date: 17 Jan 90 14:31:07 GMT To: info-unix@sem.brl.mil In article <DW31DR7xds13@ficc.uu.net> peter@ficc.uu.net (Peter da Silva) writes: >Wouldn't it be nice if there was a sanctioned P1003 subset that replaced >fork() with a combined fork()/exec() call (spawn?). Or just an addition >of spawn to the standard as an alternative process creation mechanism: >This would radically improve the performance of non-UNIX POSIX systems, >without compromising the capability of the standard... Wrong; fork() is more flexible than spawn(), and this is thoroughly exploited by UNIX applications. For example, a job control shell has many things to do between the fork() and the exec() in the child branch. IEEE P1003 decided early on not to compromise UNIX semantics merely to allow POSIX to be more readily implemented on non-UNIX platforms. ----------------------------- From: Peter da Silva <peter@ficc.uu.net> Subject: Re: The trouble with fork() (Re: IBM PC prehistory) Date: 18 Jan 90 02:47:27 GMT To: info-unix@sem.brl.mil In article <11969@smoke.BRL.MIL> gwyn@brl.arpa (Doug Gwyn) writes: > In article <DW31DR7xds13@ficc.uu.net> peter@ficc.uu.net (Peter da Silva) writes: > >Wouldn't it be nice if there was a sanctioned P1003 subset that replaced > >fork() with a combined fork()/exec() call (spawn?). Or just an addition ^^^^^^^^^^^^^^^^^^^ > >of spawn to the standard as an alternative process creation mechanism: ^^^^^^^^ ^^^^^^^^^^^^^^^^^ > >This would radically improve the performance of non-UNIX POSIX systems, > >without compromising the capability of the standard... > Wrong; fork() is more flexible than spawn(), and this is thoroughly > exploited by UNIX applications. Read my lips: no new taxes. Oops. Wrong program. Anyway, look at the second sentence above. Most cases of fork/exec could be replaced by a simple spawn call, making the majority of programs that didn't need fork/exec more efficient. How do you feel about adding coroutines to C? -- _--_|\ Peter da Silva. +1 713 274 5180. <peter@ficc.uu.net>. / \ \_.--._/ Xenix Support -- it's not just a job, it's an adventure! v "Have you hugged your wolf today?" `-_-' ----------------------------- From: Francois Bronsard <bronsard@m.cs.uiuc.edu> Subject: Unix System V link Date: 16 Jan 90 20:43:55 GMT Sender: Paul Pomes <paul@ux1.cso.uiuc.edu> To: info-unix@sem.brl.mil I have a question about the dangers of having two hard links to the same directory in Unix System V. Basically, I cannot do a symbolic link (because my version of the system is too old), so I was told that I could use the system call link() to create a hard link to a directory. However, I was warned that such a thing is dangerous since it might confuse the file system (specifically, the programs find and fsck/icheck/ncheck). Now my question is : "How dangerous is it really?" In particular, all I want to do create the following structure : $home / .. \ ... / \ FILES \ \ \ \_______files ... (The link between FILES and files is the new link that I want to have). So what problems can such a link cause to the files systems? Francois ----------------------------- From: Doug Gwyn <gwyn@smoke.brl.mil> Subject: Re: Unix System V link Date: 17 Jan 90 14:14:10 GMT To: info-unix@sem.brl.mil In article <1990Jan16.204355.13792@ux1.cso.uiuc.edu> bronsard@m.cs.uiuc.edu.UUCP (Francois Bronsard) writes: >Now my question is : "How dangerous is it really?" It's very dangerous, because when you rmdir one of the links the other will no longer find . and .. entries in the directory. Don't do it. ----------------------------- From: Kartik Subbarao <subbarao@phoenix.princeton.edu> Subject: Re: help Date: 17 Jan 90 14:18:07 GMT To: info-unix@sem.brl.mil In article <22108@adm.BRL.MIL> KOEHLER%DMRHRZ11.BITNET@cunyvm.cuny.edu (Klaus Koehler) writes: >help Maybe some UNIX Wizards can read minds, but not this one :-) Could you be more specific? -- subbarao@{phoenix,bogey or gauguin}.princeton.edu ----------------------------- From: "Martin H. Brooks" <mb33@prism.gatech.edu> Subject: Re: making compressed backups Date: 16 Jan 90 21:30:06 GMT To: info-unix@sem.brl.mil In article <1990Jan13.020205.3660@virtech.uucp> cpcahil@virtech.uucp (Conor P. Cahill) writes: >In article <1990Jan12.092215.1567@aai.uu.net>, leo@aai.uu.net (Leo Pinard) writes: >> find /usr -depth -print | cpio -oBmc | compress | dd of=/dev/rmt8 > > 1. You should do a cd /usr; find . -depth... > 2. In order to make the tape stream you probably should specify > an output block size of something like 1024k. Unless your "cpio" is different from mine, use the "a" option instead of the "m". The "a" option resets the access time after a file is backed up so that it appears not to have been accessed by the backup. On my "cpio", the "m" option is not available with the "o" output mode. -- Martin H. Brooks - Georgia Institute of Technology U.S. Mail: GTRI/RAIL/MAD/EMB 0800, Georgia Tech, Atlanta, GA 30332 uucp: ...!{decvax,hplabs,ncar,purdue,rutgers}!gatech!prism!mb33 Internet: mb33@prism.gatech.edu ----------------------------- From: urlichs@smurf.ira.uka.de Subject: Re: Robust Mounts Date: 16 Jan 90 21:35:18 GMT To: info-unix@sem.brl.mil In comp.unix.questions deke@ee.rochester.edu (Dikran Kassabian) writes: < In article <1376@smurf.ira.uka.de> urlichs@smurf.ira.uka.de writes: < > In article <10284@zodiac.ADS.COM> mliverig@spark.uucp writes: < > > < > >1) Soft mounts of read-write file systems would increase the risk of < > >corrupting the file systems. < > < >How? < < In the same way a system crash can result in corruption of local disks. < Summary information can be inaccurate depending on exactly when the crash < takes place, as it relates to pending disk writes. < < An NFS rw,hard mount is a win in this case... the process on the NFS client < hangs until the NFS mount becomes available again, and so gets to continue. < Not that this guarentees you a clean file-system, but I believe that your < chances are lots better. < Well, I fail to see why, given the following sequence of events - client sends NFS request - server (partially or completely) processes the request - server crashes either one of the following events - client times out, user program gets error or - client hangs until server is back, user program continues or - client gets disconnected by automount until server is back, user program gets error could possibly have any impact on the probability that - server disk needs to be fsck'd, probably dropping some files or that - buffer was not written on server, causing inconsistent database although the client got an OK return from NFS. A hard NFS mount obviously improves your chances if - server crashes but managed to write its buffers, but - client was doing things which left the database inconsistent. In this case, obviously, a hard mount is helpful here and either a soft mount or a client disconnected by an automount daemon would cause problems because the client has no way to get the database back into a consistent state. I hope I'm not missing anything here. < < BUT: < < My preferred solution would be to use SunOS automount(8) or Jan-Simon Pendry's < 'amd'. I'm still hoping someone will comment on my question, which < asked about automounter, and why it might be considered 'not yet safe'. < My understanding of an automount daemon is: - It periodically tests if the server is still there. - If not for N seconds, the server is unmounted. This has the same effect as a soft mount in that the client, trying to read or write a file, gets an error. - Any request to the server returns an error immediately until the server is back online, in which case - the automounter reconnects the client to the server. Anyone more knowledgeable enlighten me in case I'm wrong, please. -- Matthias Urlichs ----------------------------- From: Andy Wai <accwai@maytag.waterloo.edu> Subject: timed question Date: 16 Jan 90 22:36:59 GMT To: info-unix@sem.brl.mil Could somebody tell me what the "-i" and "-n" flag on timed really does? The man page doesn't tell me anything concrete and the "Timed Installation and Operation Guide" isn't much better either. Better yet, could somebody tell me what the proper command line is to start a submaster daemon that will propagate the time to a small subnet but won't try to take control of the backbone network should the master on the backbone dies. Thanks in advance. Andy Wai ----------------------------- From: brnstnd@stealth.acf.nyu.edu Subject: Re: How to do a non-blocking write of more than one char? Date: 16 Jan 90 23:08:35 GMT To: info-unix@sem.brl.mil I'm trying to write a ``multitee'' program so that, e.g., multitee 0:6,7 6:1 would send all input from fd 0 to fd 6 and fd 7, while sending all input from fd 6 to fd 1. It's a trivial problem, except that multitee should do its best to never block on writes. (Otherwise it could enter a deadlock with another process.) Buffering is easy, but how to avoid blocking? One correct answer is to always write just one character per write() call. Unfortunately, this usually forces a hellish overhead. Another answer is to use fcntl() and set FNDELAY on the descriptor. Unfortunately, this doesn't just affect the descriptor; it affects the entire open file, including possibly other processes. (This is the real problem.) Another answer is that multitee should fork into separate processes, one for each input descriptor. This works and solves the flow control problems, but it's not very polite to other processes unless the system supports threads. In article <2816@auspex.auspex.com> guy@auspex.auspex.com (Guy Harris) writes: > >C'mon, guys, this is a simple question! > And it may have a simple answer like "sorry, you can't do it". I guess it's a good question, then... ---Dan ----------------------------- From: Scot Mcintosh <psm@manta.nosc.mil> Subject: h files that include h files Date: 16 Jan 90 23:26:44 GMT To: info-unix@sem.brl.mil In a makefile, how should one handle the case where some of the .h files include other .h files? I see two possibilities: make dependencies for them, and 'touch' the dependent ones, thus causing the .c files that depend on them to be made. Or, examine all of the .h files, figure out the nesting and then put all of the pertinent ones in the .c file's dependency. Neither of these is particularly appealing. How does the Unix world handle this kind of thing? (If you haven't guessed, I'm not that experienced with Unix yet). Thanks. -- ---- Scot McIntosh Internet: psm@helios.nosc.mil UUCP: {ihnp4,akgua,decvax,decwest,ucbvax}!sdscvax!nosc!psm ----------------------------- From: "Jonathan I. Kamens" <jik@athena.mit.edu> Subject: Re: h files that include h files Date: 17 Jan 90 00:11:11 GMT Sender: News system <news@athena.mit.edu> To: info-unix@sem.brl.mil In article <997@manta.NOSC.MIL>, psm@manta.NOSC.MIL (Scot Mcintosh) writes: > In a makefile, how should one handle the case where some > of the .h files include other .h files? I see two > possibilities: make dependencies for them, and 'touch' > the dependent ones, thus causing the .c files that depend on > them to be made. Or, examine all of the .h files, figure out > the nesting and then put all of the pertinent ones in > the .c file's dependency. Various shell scripts and binary programs have been written to do automatically what you described in your second possibility (but the dependency would be associated with the .o file, not the .c file). Typically, they use either the -E or -M flag of the compiler. The -E flag, on compilers that have it (most of them), outputs the pre-processed text that would be compiled, without actually compiling it. Interspersed in this text is various lines like # 1 "main.c" # 1 "./xsaver.h" # 1 "/usr/include/X11/Intrinsic.h" which are used later by the preprocessor to build the symbol tables into the binaries. These lines can be played with using sed et al to generate a dependency list suitable for inclusion in a makefile. The -M flag, con compilers that have it (fewer than have the -E flag, I think) actually outputs a dependency list. The shell script versions tend to be slow -- a binary dedicated to figuring out dependencies by reading the preprocessor directives tends to do it faster. Such a binary (called "makedepend") is released as part of the standard X window system distribution -- if you have X at your site, then you have the binary (or its sources) somewhere, or you can ftp it from an X archive site. Jonathan Kamens USnail: MIT Project Athena 11 Ashford Terrace jik@Athena.MIT.EDU Allston, MA 02134 Office: 617-253-8495 Home: 617-782-0710 ----------------------------- From: Kevin O'Gorman <kevin@kosman.uucp> Subject: xDBM sources Date: 16 Jan 90 23:48:09 GMT Followup-To: comp.unix.questions To: info-unix@sem.brl.mil I see references to dbm, ndbm and mdbm from time to time. I even see that some packages that I use (like PERL, netnews) say they work more or better with these things. I can guess what they are. I don't know what the differences are among them. Can anyone mail, or send a pointer to, a set of sources? Or let me know the (happiware, guiltware, commercial, GNU, etc) status of them? -- Kevin O'Gorman ( kevin@kosman.UUCP, kevin%kosman.uucp@nrc.com ) voice: 805-984-8042 Vital Computer Systems, 5115 Beachcomber, Oxnard, CA 93035 Non-Disclaimer: my boss is me, and he stands behind everything I say. ----------------------------- From: "Ronald S. Woan/2113674" <ron@woan.austin.ibm.com> Subject: Re: xDBM sources Date: 18 Jan 90 00:03:22 GMT Sender: news@awdprime.uucp To: info-unix@sem.brl.mil In article <1068@kosman.UUCP>, kevin@kosman.UUCP (Kevin O'Gorman) writes: |>I see references to dbm, ndbm and mdbm from time to time. |>I can guess what they are. I don't know what the differences are among |>them. In general dbm belongs to the BSD world with ndbm introduced in 4.3BSD. ndbm differs from dbm in that multiple database files can be simultaneously open. The other ?dbm packages provide compatible functions for those without ndbm. I believe the GNU version is sdbm. Another version was just posted to one of the source groups (alt.sources). Ron +-----All Views Expressed Are My Own And Are Not Necessarily Shared By------+ +------------------------------My Employer----------------------------------+ + Ronald S. Woan (IBM VNET)WOAN AT AUSTIN, (AUSTIN)ron@woan.austin.ibm.com + + outside of IBM @cs.utexas.edu:ibmchs!auschs!woan.austin.ibm.com!ron + ----------------------------- From: Jim O'Connor <jim@tiamat.fsc.com> Subject: getting the system's domain name in a C program Date: 17 Jan 90 01:03:20 GMT To: info-unix@sem.brl.mil Is there a system call or library function that is supposed to return the name of the current host, complete with the domain attached? I'm a little confused, since when I set up TCP/IP on a Xenix machine, the installation scripts created the command "hostname tiamat.fsc.com" in the TCP/IP startup file, so using "hostname" or "gethostname()" returns the whole thing, and I can always use "uanme" to get just the host name with out the domain part. However, when I installed TCP/IP on our HP 9000 Model 815 machine, the installation created the command "hostname guinan" in the TCP/IP start up file. So, on guinan, I don't get the domain name with "gethostname". Which way is "right"? Is there a "right" way? Thanks for any help. ------------- James B. O'Connor jim@tiamat.fsc.com Ahlstrom Filtration, Inc. 615/821-4022 x. 651 *** Altos users unite! mail to "info-altos-request@tiamat.fsc.com" *** ----------------------------- From: brunger@venus.ycc.yale.edu Subject: csh variable manipulation Keywords: csh variables Date: 17 Jan 90 03:36:21 GMT To: info-unix@sem.brl.mil i would like to strip part of a path from a file name in a csh script. the portion of the path i would like to strip is stored in a variable. ex. WPATH = /user/tmp/ctree/orig FILEN = /user/tmp/ctree/orig/src/dix/newcode.c i would like to strip the path in WPATH from FILEN leaving src/dix/newcode.c please respond to m@jacobi.biology.yale.edu thanks in advance. ----------------------------- From: Spencer Garrett <srg@quick.com> Subject: Re: #! troubles Keywords: exec, kernel, environment Date: 17 Jan 90 04:43:45 GMT To: info-unix@sem.brl.mil In article <1990Jan15.215617.9659@i88.isc.com>, daveb@i88.isc.com (Dave Burton) writes: > In article <2047@uvaarpa.virginia.edu> worley@compass.com writes: > >> Assuming the kernel gets your $PATH (which it doesn't, but pretend) - > > > The kernel does not get _any_ environment variables. Sure, it passes an > environment pointer to the exec'd process, but this does not imply the > environment is scanned. That would be _very_ expensive. Au contraire. The environment strings are *copied* to the child process in the same manner as the argv strings. The kernel could easily scan for a PATH variable. The main argument against this is that it's the sort of feeping creaturism for which Berkeley has been long and loudly chastized, though given that #! interpretation got moved in I don't see this as an inappropriate adjunct. I think it got left out mostly because coding this sort of thing at the kernel level is a mess. ----------------------------- From: Dave Burton <daveb@i88.isc.com> Subject: Re: #! troubles Keywords: exec, kernel, environment Date: 17 Jan 90 17:22:18 GMT Sender: Steve Alexander <stevea@i88.isc.com> To: info-unix@sem.brl.mil In article <7661@quick.COM> srg@quick.COM (Spencer Garrett) writes: |In article <1990Jan15.215617.9659@i88.isc.com>, daveb@i88.isc.com (Dave Burton) writes: |> >> Assuming the kernel gets your $PATH (which it doesn't, but pretend) - |> The kernel does not get _any_ environment variables. Sure, it passes an |> environment pointer to the exec'd process, but this does not imply the |> environment is scanned. That would be _very_ expensive. | |Au contraire. The environment strings are *copied* to the child process |in the same manner as the argv strings. The kernel could easily scan |for a PATH variable. The main argument against this is that it's the |sort of feeping creaturism for which Berkeley has been long and loudly |chastized, though given that #! interpretation got moved in I don't |see this as an inappropriate adjunct. I think it got left out mostly |because coding this sort of thing at the kernel level is a mess. Unfortunately, I caught my gaff after I posted. Yes, of course the environment is copied (where would the pointer point? Oops.) I suppose I don't see this as feeping creaturism so much as simply wrong: . The kernel does not examine (better than the word get :-) any environment variables, for any case. IMHO, it shouldn't. The kernel should not change its behavior due to user environment changes. . exec[lv]p(3) were written to do $PATH scanning on exec's. At this time there was the opportunity to add $PATH scanning to the kernel, but it wasn't done, which suggests that the proper place to do this is uspace. Making exec[lv]p(3) equivalent to exec[lv](3) and placing $PATH scanning in the kernel today would break other programs (e.g. execl("prog","prog",0) with $PATH not containing the current directory). Therefore, this would have to be a special case for #! execution. . This creature is even more special case: given an suid/sgid script, $PATH scanning cannot be trusted - trivially easy to spoof. Thus, $PATH scanning wouldn't always work. The Principle of Least Astonishment? . The kernel contortions required to support this would be messy, at best (good argument for not changing the kernel, huh?). . Aside from kernel issues: as stated later in the referenced article (in comp.lang.perl), there's no good reason to do this anyway. It helps nobody. I believe this is the strongest argument against it. -- Dave Burton uunet!ism780c!laidbak!daveb ----------------------------- From: Gregory Gulik <greg@gagme.uucp> Subject: csh and signal handling... Keywords: csh trap onintr Date: 17 Jan 90 06:01:10 GMT To: info-unix@sem.brl.mil I know that in the standard sh, I can tell it to perform certain functions upon the receipt of certain signals using the trap command. I was working on a script in csh on a Harris running some BSD-line OS and the closest I came to the trap was the onintr command, but according to TFMP it cancells ALL interrupts.. I don't want that. I just want to catch the intr and hup interrupts. Has anyone gotten around this? Why is it implemented in this way? I finally found something fairly major that sh can do that csh cannot!!! -greg -- Gregory A. Gulik greg@gagme.UUCP || ...!jolnet!gagme!greg || gulik@depaul.edu ----------------------------- From: Brian Litzinger <brian@apt.uucp> Subject: problem with find(1)? Date: 17 Jan 90 07:09:41 GMT Followup-To: poster To: info-unix@sem.brl.mil I running ISC 386/ix UNIX V.3.2 and have run into the following problem with find(1): Find(1) reports the following errors while traversing part of one of my filesystems: (I'm logged in as root) # find . -print [ lotsa of normal find(1) output followed by ... ] find: stat() failed: ./brian/core: No such file or directory find: stat() failed: ./leone: No such file or directory find: stat() failed: ./chet: No such file or directory find: stat() failed: ./zyrel: No such file or directory find: stat() failed: ./marcos: No such file or directory find: stat() failed: ./btest: No such file or directory find: stat() failed: ./dmyers: No such file or directory These directories seem alright. And a command like # find chet -print works as expected, however a command like # find brian -print works mostly through the directory then reports similar errors near the end. The directory tree under brian is by far the biggest of the user directories. Is there some limit to the number of entries find(1) can process? Or has the file system become corrupt in a way that bothers nothing except find(1)? <> Brian Litzinger @ APT Technology Inc., San Jose, CA <> UUCP: {apple,sun,pyramid}!daver!apt!brian brian@apt.UUCP <> VOICE: 408 370 9077 FAX: 408 370 9291 -- <> Brian Litzinger @ APT Technology Inc., San Jose, CA <> UUCP: {apple,sun,pyramid}!daver!apt!brian brian@apt.UUCP <> VOICE: 408 370 9077 FAX: 408 370 9291 ----------------------------- From: david newall <CCDN@lv.sait.edu.au> Subject: Re: Shared libraries Date: 17 Jan 90 16:49:13 GMT To: info-unix@sem.brl.mil In article <32873@news.Think.COM>, barmar@think.com (Barry Margolin) writes: > In article <6256@levels.sait.edu.au> CCDN@levels.sait.edu.au (david newall) writes: >>UCSD p-System had the first implementation of shared libraries I know of. > > Did the p-System predate Multics, which was developed in the mid-60's? I don't recall when UCSD first did the p-System -- I think it was early '70s. I can't even say for certain that p-System version-I had shared libraries (I know version II did), although I do seem to recall that it did. Anyway, it sounds like Multics's shared libraries pre-date UCSD's. David Newall Phone: +61 8 343 3160 Unix Systems Programmer Fax: +61 8 349 6939 Academic Computing Service E-mail: ccdn@levels.sait.oz.au SA Institute of Technology Post: The Levels, South Australia, 5095 ----------------------------- From: Tin Le <tinle@aimt.uu.net> Subject: Re: Compress problem Keywords: compress error file too large Date: 17 Jan 90 17:41:13 GMT To: info-unix@sem.brl.mil In article <493@dhump.lakesys.COM>, mort@dhump.lakesys.COM (Mort d`Hump) writes: ] I am having trouble using compress to de-compress large .Z files. ] ] The operation terminates with a "File too large" error. ] ] I have a PLEXUS P-20 running vanilla Sys VR2 w/ 2Meg of RAM and over ] 25 Meg of free space on the file system I am working in. ] ] The results of compress -V: ] Based on compress.c,v 4.0 85/07/30 12:50:00 joe Release ] Options: BITS = 16 ] ] This is the first file I have trouble with: ] mort users 1059441 Dec 21 21:01 SML3.1.cpio.Z ] ] Does anyone have any pointers? The problem is your ulimit is too low. If you are in sh, check by simply typing ulimit. That will give you a number telling you the current ulimit. My guess is that it's set to the default of 2048 blocks (2MB). Increase that and you will be fine. If you are using csh, you will need to change to sh (temporarily) while you are uncompressing the file. One more note: you will need root privilege in order to change your ulimit. -- Tin Le -- Tin Le | UUCP: {wyse, claris, uunet}!aimt!tinle Sr. Software Engineer | Internet: tinle@aimt.uu.net AIM Technology | XBBS (408)-739-1520 19.2K Telebit+ Santa Clara, CA 95054 | "'tis an ill wind that blows no mind..." ----------------------------- From: "Adam W. Feigin" <adam@ncifcrf.gov> Subject: Printcap & filters for Genicom 3180-3404 Series Printers Keywords: Genicom 3404, /etc/printcap, filters Date: 17 Jan 90 18:04:29 GMT Followup-To:adam@ncifcrf.gov To: info-unix@sem.brl.mil We've got an old Genicom 3404 line printer that I'd like to hook to one of our Suns. Anybody got a printcap entry for this beastie, and any associated filters I might need ??? The Genicom 3404 is in the 3180 series of printers, but has multicolor printing. I dont really need anything fancy, just something that'll at least let me use the thing as a dumb line printer for the short term...I'll hack something up later for the good stuff.... Thanks in advance. AWF -- Internet: adam@ncifcrf.gov Adam W. Feigin UUCP: {backbonz}!ncifcrf!adam Senior Systems Manager Mail: P.O. Box B, Bldg 430 National Cancer Institute-Supercomputer Center Frederick, MD 21701 Frederick Cancer Research Facility ----------------------------- From: Dan Jacobson <danj1@cbnewse.att.com> Subject: Hex input to awk Date: 17 Jan 90 19:59:57 GMT To: info-unix@sem.brl.mil What's the easy way to read in hexidecimal numbers in [n]awk? There's no scanf function. Outputting them is no problem (printf, OFMT). But what if you have a input file like: Burgers 04ff Wax 2d3f I hope I don't have to write a function. -- Dan Jacobson +1-708-979-6364 danj1@ihlpa.ATT.COM ----------------------------- From: 4277_5067@uwovax.uwo.ca Subject: Wanted: Info. on zic Date: 17 Jan 90 21:02:12 GMT To: info-unix@sem.brl.mil I have been trying to prepare a brief report on the 'zic' (Time Zone Compiler) tool, for my class (I am a student too!). Unfortunately, I couldn't find sufficient technical infomation, such as how it works, what kind of results it generates, etc..., on zic. If anybody has something to say about zic, I would greatly appreciate it. Thanks in advance. Miky_The_Dragon ruling.... ----------------------------- From: Mike McManus <mikemc@mustang.ncr-fc.ftcollins.ncr.com> Subject: Passing variables to gawk Date: 17 Jan 90 21:12:46 GMT Sender: news@ncr-fc.ftcollins.ncr.com To: info-unix@sem.brl.mil I want to pass variables to a gawk program via the command line. According to the man page, all you need do is call gawk with <var>=<value> instead of file names: gawk -f foo.awk a=1 b=2 c=3 infile > outfile and the variables a,b,c will be free to use in foo.awk (the gawk script), and will be assigned the values 1,2,3. I can't seem to get this to work! When I print the value of the variables inside a BEGIN{} block in foo.awk, they are all set to 0. Anybody have any experience with this that they'd like to share? Thanks! -- Disclaimer: All spelling and/or grammer in this document are guaranteed to be correct; any exseptions is the is wurk uv intter-net deemuns. Mike McManus (mikemc@ncr-fc.FtCollins.ncr.com) NCR Microelectronics 2001 Danfield Ct. ncr-fc!mikemc@ncr-sd.sandiego.ncr.com, or Ft. Collins, Colorado ncr-fc!mikemc@ccncsu.colostate.edu, or (303) 223-5100 Ext. 360 uunet!ncrlnk!ncr-sd!ncr-fc!garage!mikemc ----------------------------- From: Mike Macgirvin <mike@relgyro.stanford.edu> Subject: panic: sys pt too small Date: 17 Jan 90 21:57:37 GMT Sender: news@helens.stanford.edu To: info-unix@sem.brl.mil I am adding kernel support for a Xylogics 753 controller. Booting the new kernel results in the message "sys pt too small", and a panic reboot. I have object license only, no OS source. Question: What causes a "sys pt too small" panic? i.e. What is a "pt"? Can I enlarge it through a config change (without OS source license) ? Or, do I have to remove some devices? Any particular kind of devices? The displayed string was tracked down to "/usr/sys/OBJ/machdep.o". Please respond via e-mail if possible. I will summarize if desired. ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + Mike Macgirvin Relativity Gyroscope Experiment (GP-B) + + mike@relgyro.stanford.edu (36.64.0.50) + ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ ----------------------------- From: Rick Peralta <peralta@pinocchio.encore.com> Subject: size of a file Date: 18 Jan 90 00:46:32 GMT Sender: news@encore.com To: info-unix@sem.brl.mil In most implementations a pointer to the offset in the file is maintained. The file (and filesystem) cannot ecxcede the limit of the int. So, how can a very large file be accommodated? On a 16 bit machine this must have been a critical problem. Does anyone know how it was overcome? - Rick "Maybe compiler vodo, floating point hacks, secret math libraries..." ----------------------------- From: Brian Litzinger <brian@apt.uucp> Subject: SUMMARY: problem with find(1) Date: 18 Jan 90 02:50:42 GMT Followup-To: poster To: info-unix@sem.brl.mil I an earlier posting I asked for help with a problem I was having with find(1). The problem was find(1) would stop at a point through the file system and report the same error from that point on. The file system worked correctly in all aspects except for the find(1) problem. Several people responded that there must be something wrong with the file system. Along another discussion subject the cause of my problem was identified. This discussion was unrelated to my posting. >In article <1990Jan16.204355.13792@ux1.cso.uiuc.edu> bronsard@m.cs.uiuc.edu.UUCP (Francois Bronsard) writes: >>Now my question is : "How dangerous is it really?" > >It's very dangerous, because when you rmdir one of the links >the other will no longer find . and .. entries in the directory. > >Don't do it. [ 'it' refers to using /etc/link ] I had used /etc/link to link a directory from one account to another. The destination link has long since been erased, however, it broke the '.' and '..' entries in that directory which broke find(1). I have removed the other half of the /etc/link'ed directory and the file system is all better. Thanks for the help. <> Brian Litzinger @ APT Technology Inc., San Jose, CA <> UUCP: {apple,sun,pyramid}!daver!apt!brian brian@apt.UUCP <> VOICE: 408 370 9077 FAX: 408 370 9291 -- <> Brian Litzinger @ APT Technology Inc., San Jose, CA <> UUCP: {apple,sun,pyramid}!daver!apt!brian brian@apt.UUCP <> VOICE: 408 370 9077 FAX: 408 370 9291 ----------------------------- From: Richard Todd Wall <wall-rt@cscosl.ncsu.edu> Subject: Unix Operating System on an PC XT. Date: 18 Jan 90 03:57:07 GMT To: info-unix@sem.brl.mil I am currently interested in running a unix operating system on my IBM PC XT clone, and I would like some input from any fellow unix IBMers as to the best one to get. Here are some things I would like to have access to... 1) uucp with the ability to get news and send mail to other unix machines. 2) Have multi-user, multi-processing capibilities. 3) Run a terminal off my serial port. 4) I need one with a C compiler that can handle large files like NETHACK. 5) And one that will boot off of floppies and then only access my second hard drive. i.e. I want to still be able to do MSDOS and not loose my data. Any help with this will be greatly appreciated.. Thanks again. -> Todd Wall <- wall-rt@cscosl.ncsu.edu ----------------------------- From: brunger@venus.ycc.yale.edu Subject: How does a process use memory??? Date: 18 Jan 90 04:31:19 GMT To: info-unix@sem.brl.mil I am looking for a description of how memory is used by a process in a Unix system. Is there any thing I can count on across processors? Background: We have a very large program written in FORTRAN and C. The program performs very long simulations (up to 1 week of Cray time). During a run it may perform thousands of mallocs and frees. Most of the time this allocated space is tied to a FORTRAN array by calculating the array index for the given address. I am trying to provide a mechanism that will provide a map of the process's memory at a given time. Showing our allocated space in relating to the code, data (the FORTRAN array in particular), stack, etc. space. Some systems seem to do a good job at reclaiming freed space while others do not. I have assumed that the systems programmers used the optimum algorithm for their architecture, but I would like to verify this while learning something myself. please respond to: m@jacobi.biology.yale.edu Mark McCallum Thanks in advance. Also thank you for the usefull replies to a previous question on csh variable manipulation. ----------------------------- From: Marc Lesure <system@asuvax.asu.edu> Subject: Shadow passwds breaks programs with pw_stayopen? Keywords: shadow passwds pwd Date: 18 Jan 90 06:32:34 GMT To: info-unix@sem.brl.mil I just install the shadow password code from Berkeley on one of our Vax 780's running 4.3-tahoe. When I did, the programs quot, finger, find, and others broke. The programs would core dump and re-compiling them determined that the common fault was an unresolved reference to pw_stayopen. Looking at the sources on both a 4.3-tahoe with and without the shadow passwords, I've been unable to find pw_stayopen on either. My questions are where is pw_stayopen defined? And, Why did shadow passwords eliminate it? ----------------------------------------------------------------------- Marc Lesure / Arizona State University / Tempe, AZ "Between the world of men and make-believe, I can be found..." "False faces and meaningless chases, I travel alone..." "And where do you go when you come to the end of your dream?" UUCP: ...!ncar!noao!asuvax!lesure Internet: lesure@asuvax.eas.asu.edu ----------------------------- End of INFO-UNIX Digest ***********************
postmaster@sandia.gov (SMTP MAILER) (06/06/90)
----Mail status follows---- Have been unable to send your mail to <ckaul%math@cs.sandia.gov>, will keep trying for a total of three days. At that time your mail will be returned. ----Transcript of message follows---- Date: 5 Jun 90 05:09:00 MDT From: info-unix@BRL.MIL Subject: INFO-UNIX Digest V10#052 To: "ckaul" <ckaul%math@cs.sandia.gov> Return-Path: <incoming-info-unix-request@sandia.gov> Received: from SEM.BRL.MIL by sandia.gov with SMTP ; Tue, 5 Jun 90 04:59:10 MDT Received: from SEM.BRL.MIL by SEM.BRL.MIL id ab06444; 5 Jun 90 6:06 EDT Received: from sem.brl.mil by SEM.BRL.MIL id aa06436; 5 Jun 90 5:45 EDT Date: Tue, 05 Jun 90 05:45:19 EST From: The Moderator (Mike Muuss) <Info-Unix-Request@BRL.MIL> To: INFO-UNIX@BRL.MIL Reply-To: INFO-UNIX@BRL.MIL Subject: INFO-UNIX Digest V10#052 Message-ID: <9006050545.aa06436@SEM.BRL.MIL> INFO-UNIX Digest Tue, 05 Jun 1990 V10#052 Today's Topics: Re: How secure is UNIX? Re: SEX! or, how do I mail to a lot of unix users? Re: REVISED: How do I send e-mail to lots of users at a remote unix site? Re: Unix for PDP-11/23 Abnormal Cron Behavior -- very strange. Using RCS and make Re: Unix for PDP-11/23 Re: How secure is UNIX? ----------------------------------------------------------------- From: Dan KoGai <dankg@tornado.berkeley.edu> Subject: Re: How secure is UNIX? Keywords: Security, ftp Date: 4 Jun 90 10:24:22 GMT Sender: "USENET Administrator;;;;ZU44" <usenet@agate.berkeley.edu> To: info-unix@sem.brl.mil In article <36584@ucbvax.BERKELEY.EDU> lauther@janus.Berkeley.EDU.UUCP (Ulrich Lauther) writes: >In article <6368@amelia.nas.nasa.gov> samlb@pioneer.arc.nasa.gov.UUCP (Sam Bassett RCS) writes: >> >> I agree -- the documentation should be more straightforward about >>the dangers of the .netrc, and for d**n sure, whoever is teaching kids > >I just wonder why not the same technique is used with .netrc as with >/etc/passwd: have the file readable, but sensitive parts encrypted? I don't think so: I don't think /etc/passwd was a good idea: It's encrypted. So what? That means you can take time to feed random string to encryptor, which is available, then find the matching string. Maybe you can feed it from dict file--people's name makes big candidate for considerably many people choose their password from thier (boy|girl)friends' or spouses' names. What I don't understand is that my password is not a kind of string found on dict but it's still feasible to use "power" rather than "tech" to break secirity in UNIX. I admit my .netrc was not a good idea. But still I think it's possible for that moron to kill at least OCF account: Some others suggested that some of UNIX has a serious problem in user switching. One of my friends witnessed that he was accidentally su'd to somebody else. At very least finger info and passwd file must be saparated. If possible, it might be a good idea to hard-code secirity part of UNIX, that is, implement seciryty by hardware than software. On current system encrypted or not, precious password info is visible. How about ATM card way (I don't think it's valid idea--How about dialin?)--No one but card knows your password. there remains the problem in case of loss of cards or "keys" but it's at very least far more secure than current UNIX implementation of password. ---------------- ____ __ __ + Dan The "Raped" Man ||__||__| + E-mail: dankg@ocf.berkeley.edu ____| ______ + Voice: +1 415-549-6111 | |__|__| + USnail: 1730 Laloma Berkeley, CA 94709 U.S.A |___ |__|__| + |____|____ + "What's the biggest U.S. export to Japan?" \_| | + "Bullshit. It makes the best fertilizer for their rice" ----------------------------- From: Dan KoGai <dankg@tornado.berkeley.edu> Subject: Re: SEX! or, how do I mail to a lot of unix users? Keywords: sex, batchmail Date: 4 Jun 90 11:41:12 GMT Sender: "USENET Administrator;;;;ZU44" <usenet@agate.berkeley.edu> To: info-unix@sem.brl.mil In article <900531083002.30e0d06c@Csa2.LBL.Gov> thermal%solgel.hepnet@CSA2.LBL.GOV writes: >I would like to be able to send a mail message to all the users on >a unix machine. Of course, I could do it the long way, that is, >do a 'finger' or 'who', thus getting a list of all the users, and >then sending a mail message to each, one at a time. Is there a >quicker way? (it seems to me there could be two or three different >ways, such as setting up a mailing list, or some nifty command that >will do this on one stroke of the finger). Obviously, I'm not a >unix guru or wizard, so make your explanation understandable, please. I advise aginst it: 1st of all it may clog /usr/spool/mail if you batchmail something big. 2nd of all UNIX offers several other utilities such as msgs to send messages to unspecific users. I say so because I'm an ex-con: I did it once and my professor axed me. It's considered antisocial as long as UNIX has alternate ways. But batchmail appears anytime before election of student sanate and I'm pissed to find those damn political campaigns on my already large mail file. However, since I am not a kind of person trying to secure things by keeping people ignorant, I'll show you just one example. This works only when your system uses /etc/passwd, which is a lot of cases but not necessarily true (most large sites use yp). On /etc/passwd, each users info is stored in each line, each field delimited by ':'. Login name appears 1st and that's the only thing you need. so only thing it takes is: Dana's prompt > mail `awk -F: '{print $1}' /etc/passwd` But this is hardly elegant, especially when you have too many accounts: it may cause your mail header to overflow. To avoid this, you can use following csh script (Sorry, I'm berkeleynian and not used to sh): #!/bin/csh -f #foo foreach address (`awk -F: '{print $1}' /etc/passwd`) mail $address < $1 end And invoke this script by "foo file-to-send". Careful! your /etc/passwd might contain bogus uses and my example has no fool-proof feature. to achieve it, just change awk script in there. If your site uses yp things are completely different but you still got the idea: The only trick is how to get all user names. But I repeat: Don't batchmail unless you have to: Use msgs or other utils. If you have local newsgroups, post there! Mail is supposed to be for personal uses and I hate direct mails and stuffs. ---------------- ____ __ __ + Dan The "ex-con" Man ||__||__| + E-mail: dankg@ocf.berkeley.edu ____| ______ + Voice: +1 415-549-6111 | |__|__| + USnail: 1730 Laloma Berkeley, CA 94709 U.S.A |___ |__|__| + |____|____ + "What's the biggest U.S. export to Japan?" \_| | + "Bullshit. It makes the best fertilizer for their rice" ----------------------------- From: Dan KoGai <dankg@tornado.berkeley.edu> Subject: Re: REVISED: How do I send e-mail to lots of users at a remote unix site? Date: 4 Jun 90 11:54:07 GMT Sender: "USENET Administrator;;;;ZU44" <usenet@agate.berkeley.edu> To: info-unix@sem.brl.mil In article <900531093335.30e0f102@Csa2.LBL.Gov> thermal%solgel.hepnet@CSA2.LBL.GOV writes: > >I would like to be able to send a mail message to all the users on >ANOTHER unix machine via Internet. Of course, I could do it the long >and tedious way, that is, by sending a mail message to each user, one >at a time. Is there a quicker way? (it seems to me there could be two >or three different ways, such as setting up a mailing list file on my >machine which will automatically mail the message to all on the list, >or sending one message to the remote machine and somehow instruct it >to distribute the message to all the users). Obviously, I'm not a >unix guru or wizard, so make your explanation understandable, please. > In my last followup, I said "you'd better not do that" and that time I was assuming you just wanted to batchmail locally. Now you are asking for doing it remotely. I say "don't do it!" Batchmail in local site alone is anti-social enough. Batch-remote mail sounds as guily as a crime: It would end up with clogging network. One day I posted same article to another newsgroup (How secure is UNIX?) because I forgot to crosspost and got a dozen mails criticizing that. My mistake is nothing compared to what you are tring to do. And to make matters worse, it could be as easy as the case of local batchmailing: The only thing you need is list of address and there are many ways to do that: I don't think you can get remote list unless you have the remote account and read access to /etc/passwd or yp but still this can be resolved if you have a friend in remote site and have her/him mail the list to you. The only thing we can depend on net traffic is conscience of each users so far. I can't criticize you because I am not 100% innocent but the fact remains. Plus why do you need it? We already have netnews if you need to broadcast something. Please don't abuse e-mails. ---------------- ____ __ __ + Dan The "ex-con" Man ||__||__| + E-mail: dankg@ocf.berkeley.edu ____| ______ + Voice: +1 415-549-6111 | |__|__| + USnail: 1730 Laloma Berkeley, CA 94709 U.S.A |___ |__|__| + |____|____ + "What's the biggest U.S. export to Japan?" \_| | + "Bullshit. It makes the best fertilizer for their rice" ----------------------------- From: Doug Toppin <toppin@melpar.uucp> Subject: Re: Unix for PDP-11/23 Date: 4 Jun 90 15:15:14 GMT Followup-To: poster To: info-unix@sem.brl.mil In article <31@mhinfo.UUCP>, carrato@mhinfo.UUCP ( tony carrato) writes: > A friend has a PDP-11/23 sitting in a closet at home. We were wondering We use extensively something called Ultrix-11 on the 11/73. It is not bad. DEC used to sell it but I believe that they just stopped supporting it. You might be able to get it for free from them. Doug Toppin uunet!melpar!toppin ----------------------------- From: Meek <kmeek@cti1.uucp> Subject: Abnormal Cron Behavior -- very strange. Keywords: cron Date: 4 Jun 90 18:52:54 GMT To: info-unix@sem.brl.mil Our cron seems to be acting a little strange: When we do a crontab -l it lists all the entries that we have queued up using the crontab command. But according to the log only some of them are being executed. Another strange thing is when we try to restart the cron after it is already running it comes back with the following message: ! cannot start cron; FIFO exists Wed Dec 31 19:00:09 1969 ! ******* CRON ABORTED ******** Wed Dec 31 19:00:09 1969 Notice the date -- 1969! this is definitely not correct and does not correspond to the system time or the time stamp of the /usr/lib/cron/FIFO file which looks like this: prw------- 1 root other 0 Jun 1 14:04 /usr/lib/cron/FIFO We are running AT&T System V 3.2.2 on a 3B2/600G if that helps. Please Email any suggestions or ideas to me and I will summarize. Thanks Kevin Meek Comprehensive Technologies Int'l Inc. 2121 Crystal Drive Suite #103 Arlington, VA 22202 uunet!cit1!kmeek OR cti1!kmeek@uunet.uu.net ----------------------------- From: Michael R Tucker <mrt7455@evtprp0b> Subject: Using RCS and make Keywords: RCS, make, unix, version control Date: 4 Jun 90 16:37:58 GMT Sender: mrt7455@evtprp0b.uucp Followup-To: comp.lang.c To: info-unix@sem.brl.mil I am looking into using RCS for version control of my software projects. I would like to know how to use RCS and make together. If any one can help me, I'd sure appreciate it. I would like to see an example makefile using RCS. ----------------------------- From: David Taylor <dave@upvax.uucp> Subject: Re: Unix for PDP-11/23 Date: 4 Jun 90 16:44:42 GMT Followup-To: comp.sys.dec To: info-unix@sem.brl.mil I would also be interested in locating a copy of unix for an 11/23 , Especially BSD (I have a license but no code it was lost before my time when they upgraded one of our systems) Thanks for any info.. Dave ------------------------------------------------------------------------------ > David Taylor, Senior Systems Operator | My opinions are my own and my boss < > University of Portland | Likes it that way..................< > School of Engineering | E-Mail: < > 5000 N Willamette Blvd. | UUCP: ...!tektronix!upvax!dave < > Portland Or. 97203-5798 | ph: (503) 283-7309 < ------------------------------------------------------------------------------ ----------------------------- From: Boyd Roberts <boyd@necisa.ho.necisa.oz> Subject: Re: How secure is UNIX? Keywords: Security, ftp Date: 5 Jun 90 00:59:39 GMT ley.edu> To: info-unix@sem.brl.mil In article <1990Jun4.102422.12896@agate.berkeley.edu> dankg@tornado.Berkeley.EDU (Dan KoGai) writes: > > I don't think so: I don't think /etc/passwd was a good idea: It's >encrypted. So what? That means you can take time to feed random string to >encryptor, which is available, then find the matching string. > Dan, my man you seem to have jumped to the conclusion that UNIX isn't secure because someone broke into your account and blew away your files. How this was done would appear to be attributable to stupidity, and not to underlying flaws in UNIX password security. At this point I'd like to make the distinction between UNIX password security and the various `security' of IP based networking utilities. With those, there is _no_ security. I think RTM and various others have proved this beyond a shadow of a doubt. UNIX password security is secure, provided you have chosen a reasonable password. Sure, you can snarf /etc/passwd and try a dictionary attack. But, you have to get access to the machine first. Without access to the machine it's near impossible to break. Shadow password files nullify this method of attack, although I don't like this password file dichotomy. The bottom line is that password security works. Most systems aren't broken into. The ones that are broken are usually compromised by some sloppy (ie. networking) utility or a flawed UNIX port. So Dan, a piece of advice: $@$*$H$7$^$((J $@$*(J $@$D$1$F(J! Boyd Roberts boyd@necisa.ho.necisa.oz.au ``When the going gets wierd, the weird turn pro...'' ----------------------------- End of INFO-UNIX Digest ***********************
postmaster@sandia.gov (SMTP MAILER) (06/06/90)
----Mail status follows---- Have been unable to send your mail to <jnjortn@ceratiidae.cs.sandia.gov>, will keep trying for a total of three days. At that time your mail will be returned. ----Transcript of message follows---- Date: 5 Jun 90 05:03:00 MDT From: info-unix@BRL.MIL Subject: INFO-UNIX Digest V10#052 To: "jnjortn" <jnjortn@ceratiidae.cs.sandia.gov> Return-Path: <incoming-info-unix-request@sandia.gov> Received: from SEM.BRL.MIL by sandia.gov with SMTP ; Tue, 5 Jun 90 04:59:10 MDT Received: from SEM.BRL.MIL by SEM.BRL.MIL id ab06444; 5 Jun 90 6:06 EDT Received: from sem.brl.mil by SEM.BRL.MIL id aa06436; 5 Jun 90 5:45 EDT Date: Tue, 05 Jun 90 05:45:19 EST From: The Moderator (Mike Muuss) <Info-Unix-Request@BRL.MIL> To: INFO-UNIX@BRL.MIL Reply-To: INFO-UNIX@BRL.MIL Subject: INFO-UNIX Digest V10#052 Message-ID: <9006050545.aa06436@SEM.BRL.MIL> INFO-UNIX Digest Tue, 05 Jun 1990 V10#052 Today's Topics: Re: How secure is UNIX? Re: SEX! or, how do I mail to a lot of unix users? Re: REVISED: How do I send e-mail to lots of users at a remote unix site? Re: Unix for PDP-11/23 Abnormal Cron Behavior -- very strange. Using RCS and make Re: Unix for PDP-11/23 Re: How secure is UNIX? ----------------------------------------------------------------- From: Dan KoGai <dankg@tornado.berkeley.edu> Subject: Re: How secure is UNIX? Keywords: Security, ftp Date: 4 Jun 90 10:24:22 GMT Sender: "USENET Administrator;;;;ZU44" <usenet@agate.berkeley.edu> To: info-unix@sem.brl.mil In article <36584@ucbvax.BERKELEY.EDU> lauther@janus.Berkeley.EDU.UUCP (Ulrich Lauther) writes: >In article <6368@amelia.nas.nasa.gov> samlb@pioneer.arc.nasa.gov.UUCP (Sam Bassett RCS) writes: >> >> I agree -- the documentation should be more straightforward about >>the dangers of the .netrc, and for d**n sure, whoever is teaching kids > >I just wonder why not the same technique is used with .netrc as with >/etc/passwd: have the file readable, but sensitive parts encrypted? I don't think so: I don't think /etc/passwd was a good idea: It's encrypted. So what? That means you can take time to feed random string to encryptor, which is available, then find the matching string. Maybe you can feed it from dict file--people's name makes big candidate for considerably many people choose their password from thier (boy|girl)friends' or spouses' names. What I don't understand is that my password is not a kind of string found on dict but it's still feasible to use "power" rather than "tech" to break secirity in UNIX. I admit my .netrc was not a good idea. But still I think it's possible for that moron to kill at least OCF account: Some others suggested that some of UNIX has a serious problem in user switching. One of my friends witnessed that he was accidentally su'd to somebody else. At very least finger info and passwd file must be saparated. If possible, it might be a good idea to hard-code secirity part of UNIX, that is, implement seciryty by hardware than software. On current system encrypted or not, precious password info is visible. How about ATM card way (I don't think it's valid idea--How about dialin?)--No one but card knows your password. there remains the problem in case of loss of cards or "keys" but it's at very least far more secure than current UNIX implementation of password. ---------------- ____ __ __ + Dan The "Raped" Man ||__||__| + E-mail: dankg@ocf.berkeley.edu ____| ______ + Voice: +1 415-549-6111 | |__|__| + USnail: 1730 Laloma Berkeley, CA 94709 U.S.A |___ |__|__| + |____|____ + "What's the biggest U.S. export to Japan?" \_| | + "Bullshit. It makes the best fertilizer for their rice" ----------------------------- From: Dan KoGai <dankg@tornado.berkeley.edu> Subject: Re: SEX! or, how do I mail to a lot of unix users? Keywords: sex, batchmail Date: 4 Jun 90 11:41:12 GMT Sender: "USENET Administrator;;;;ZU44" <usenet@agate.berkeley.edu> To: info-unix@sem.brl.mil In article <900531083002.30e0d06c@Csa2.LBL.Gov> thermal%solgel.hepnet@CSA2.LBL.GOV writes: >I would like to be able to send a mail message to all the users on >a unix machine. Of course, I could do it the long way, that is, >do a 'finger' or 'who', thus getting a list of all the users, and >then sending a mail message to each, one at a time. Is there a >quicker way? (it seems to me there could be two or three different >ways, such as setting up a mailing list, or some nifty command that >will do this on one stroke of the finger). Obviously, I'm not a >unix guru or wizard, so make your explanation understandable, please. I advise aginst it: 1st of all it may clog /usr/spool/mail if you batchmail something big. 2nd of all UNIX offers several other utilities such as msgs to send messages to unspecific users. I say so because I'm an ex-con: I did it once and my professor axed me. It's considered antisocial as long as UNIX has alternate ways. But batchmail appears anytime before election of student sanate and I'm pissed to find those damn political campaigns on my already large mail file. However, since I am not a kind of person trying to secure things by keeping people ignorant, I'll show you just one example. This works only when your system uses /etc/passwd, which is a lot of cases but not necessarily true (most large sites use yp). On /etc/passwd, each users info is stored in each line, each field delimited by ':'. Login name appears 1st and that's the only thing you need. so only thing it takes is: Dana's prompt > mail `awk -F: '{print $1}' /etc/passwd` But this is hardly elegant, especially when you have too many accounts: it may cause your mail header to overflow. To avoid this, you can use following csh script (Sorry, I'm berkeleynian and not used to sh): #!/bin/csh -f #foo foreach address (`awk -F: '{print $1}' /etc/passwd`) mail $address < $1 end And invoke this script by "foo file-to-send". Careful! your /etc/passwd might contain bogus uses and my example has no fool-proof feature. to achieve it, just change awk script in there. If your site uses yp things are completely different but you still got the idea: The only trick is how to get all user names. But I repeat: Don't batchmail unless you have to: Use msgs or other utils. If you have local newsgroups, post there! Mail is supposed to be for personal uses and I hate direct mails and stuffs. ---------------- ____ __ __ + Dan The "ex-con" Man ||__||__| + E-mail: dankg@ocf.berkeley.edu ____| ______ + Voice: +1 415-549-6111 | |__|__| + USnail: 1730 Laloma Berkeley, CA 94709 U.S.A |___ |__|__| + |____|____ + "What's the biggest U.S. export to Japan?" \_| | + "Bullshit. It makes the best fertilizer for their rice" ----------------------------- From: Dan KoGai <dankg@tornado.berkeley.edu> Subject: Re: REVISED: How do I send e-mail to lots of users at a remote unix site? Date: 4 Jun 90 11:54:07 GMT Sender: "USENET Administrator;;;;ZU44" <usenet@agate.berkeley.edu> To: info-unix@sem.brl.mil In article <900531093335.30e0f102@Csa2.LBL.Gov> thermal%solgel.hepnet@CSA2.LBL.GOV writes: > >I would like to be able to send a mail message to all the users on >ANOTHER unix machine via Internet. Of course, I could do it the long >and tedious way, that is, by sending a mail message to each user, one >at a time. Is there a quicker way? (it seems to me there could be two >or three different ways, such as setting up a mailing list file on my >machine which will automatically mail the message to all on the list, >or sending one message to the remote machine and somehow instruct it >to distribute the message to all the users). Obviously, I'm not a >unix guru or wizard, so make your explanation understandable, please. > In my last followup, I said "you'd better not do that" and that time I was assuming you just wanted to batchmail locally. Now you are asking for doing it remotely. I say "don't do it!" Batchmail in local site alone is anti-social enough. Batch-remote mail sounds as guily as a crime: It would end up with clogging network. One day I posted same article to another newsgroup (How secure is UNIX?) because I forgot to crosspost and got a dozen mails criticizing that. My mistake is nothing compared to what you are tring to do. And to make matters worse, it could be as easy as the case of local batchmailing: The only thing you need is list of address and there are many ways to do that: I don't think you can get remote list unless you have the remote account and read access to /etc/passwd or yp but still this can be resolved if you have a friend in remote site and have her/him mail the list to you. The only thing we can depend on net traffic is conscience of each users so far. I can't criticize you because I am not 100% innocent but the fact remains. Plus why do you need it? We already have netnews if you need to broadcast something. Please don't abuse e-mails. ---------------- ____ __ __ + Dan The "ex-con" Man ||__||__| + E-mail: dankg@ocf.berkeley.edu ____| ______ + Voice: +1 415-549-6111 | |__|__| + USnail: 1730 Laloma Berkeley, CA 94709 U.S.A |___ |__|__| + |____|____ + "What's the biggest U.S. export to Japan?" \_| | + "Bullshit. It makes the best fertilizer for their rice" ----------------------------- From: Doug Toppin <toppin@melpar.uucp> Subject: Re: Unix for PDP-11/23 Date: 4 Jun 90 15:15:14 GMT Followup-To: poster To: info-unix@sem.brl.mil In article <31@mhinfo.UUCP>, carrato@mhinfo.UUCP ( tony carrato) writes: > A friend has a PDP-11/23 sitting in a closet at home. We were wondering We use extensively something called Ultrix-11 on the 11/73. It is not bad. DEC used to sell it but I believe that they just stopped supporting it. You might be able to get it for free from them. Doug Toppin uunet!melpar!toppin ----------------------------- From: Meek <kmeek@cti1.uucp> Subject: Abnormal Cron Behavior -- very strange. Keywords: cron Date: 4 Jun 90 18:52:54 GMT To: info-unix@sem.brl.mil Our cron seems to be acting a little strange: When we do a crontab -l it lists all the entries that we have queued up using the crontab command. But according to the log only some of them are being executed. Another strange thing is when we try to restart the cron after it is already running it comes back with the following message: ! cannot start cron; FIFO exists Wed Dec 31 19:00:09 1969 ! ******* CRON ABORTED ******** Wed Dec 31 19:00:09 1969 Notice the date -- 1969! this is definitely not correct and does not correspond to the system time or the time stamp of the /usr/lib/cron/FIFO file which looks like this: prw------- 1 root other 0 Jun 1 14:04 /usr/lib/cron/FIFO We are running AT&T System V 3.2.2 on a 3B2/600G if that helps. Please Email any suggestions or ideas to me and I will summarize. Thanks Kevin Meek Comprehensive Technologies Int'l Inc. 2121 Crystal Drive Suite #103 Arlington, VA 22202 uunet!cit1!kmeek OR cti1!kmeek@uunet.uu.net ----------------------------- From: Michael R Tucker <mrt7455@evtprp0b> Subject: Using RCS and make Keywords: RCS, make, unix, version control Date: 4 Jun 90 16:37:58 GMT Sender: mrt7455@evtprp0b.uucp Followup-To: comp.lang.c To: info-unix@sem.brl.mil I am looking into using RCS for version control of my software projects. I would like to know how to use RCS and make together. If any one can help me, I'd sure appreciate it. I would like to see an example makefile using RCS. ----------------------------- From: David Taylor <dave@upvax.uucp> Subject: Re: Unix for PDP-11/23 Date: 4 Jun 90 16:44:42 GMT Followup-To: comp.sys.dec To: info-unix@sem.brl.mil I would also be interested in locating a copy of unix for an 11/23 , Especially BSD (I have a license but no code it was lost before my time when they upgraded one of our systems) Thanks for any info.. Dave ------------------------------------------------------------------------------ > David Taylor, Senior Systems Operator | My opinions are my own and my boss < > University of Portland | Likes it that way..................< > School of Engineering | E-Mail: < > 5000 N Willamette Blvd. | UUCP: ...!tektronix!upvax!dave < > Portland Or. 97203-5798 | ph: (503) 283-7309 < ------------------------------------------------------------------------------ ----------------------------- From: Boyd Roberts <boyd@necisa.ho.necisa.oz> Subject: Re: How secure is UNIX? Keywords: Security, ftp Date: 5 Jun 90 00:59:39 GMT ley.edu> To: info-unix@sem.brl.mil In article <1990Jun4.102422.12896@agate.berkeley.edu> dankg@tornado.Berkeley.EDU (Dan KoGai) writes: > > I don't think so: I don't think /etc/passwd was a good idea: It's >encrypted. So what? That means you can take time to feed random string to >encryptor, which is available, then find the matching string. > Dan, my man you seem to have jumped to the conclusion that UNIX isn't secure because someone broke into your account and blew away your files. How this was done would appear to be attributable to stupidity, and not to underlying flaws in UNIX password security. At this point I'd like to make the distinction between UNIX password security and the various `security' of IP based networking utilities. With those, there is _no_ security. I think RTM and various others have proved this beyond a shadow of a doubt. UNIX password security is secure, provided you have chosen a reasonable password. Sure, you can snarf /etc/passwd and try a dictionary attack. But, you have to get access to the machine first. Without access to the machine it's near impossible to break. Shadow password files nullify this method of attack, although I don't like this password file dichotomy. The bottom line is that password security works. Most systems aren't broken into. The ones that are broken are usually compromised by some sloppy (ie. networking) utility or a flawed UNIX port. So Dan, a piece of advice: $@$*$H$7$^$((J $@$*(J $@$D$1$F(J! Boyd Roberts boyd@necisa.ho.necisa.oz.au ``When the going gets wierd, the weird turn pro...'' ----------------------------- End of INFO-UNIX Digest ***********************