HDTenEightyP/NetNews huggingface dataset:
From: barmar@think.com (Barry Margolin)
Newsgroups: comp.unix.questions
Subject: Re: Swap space usage..?? THE ANSWER
Date: 21 Aug 1992 20:11:18 GMT
Organization: Thinking Machines Corporation, Cambridge MA, USA
NNTP-Posting-Host: telecaster.think.com

In article <27537@sophia.inria.fr> rriv@oural.inria.fr (Robert Riviere) writes:
>Funny. You can swap in a (almost) regular file !
>But doesn'it generate a lot of overhead ?

No, why should it?  It's just disk access.  When you mount a file as swap
space, it simply adds the blocks in the file to the list of disk blocks
that the paging routines can use.  To the paging routines, all disk blocks
are equivalent.  This uses basically the same mechanisms as are used to
mmap a file or page out of the text segment of an executable or shared
library.
-- 
Barry Margolin
System Manager, Thinking Machines Corp.

barmar@think.com          {uunet,harvard}!think!barmar
Newsgroups: comp.unix.questions,comp.unix.programmer
From: umnoor@ccu.umanitoba.ca (Nasir Ahmed Noor)
Subject: RE: ``Sort'' Problem (addition)
Followup-To: poster
Organization: University of Manitoba, Winnipeg, Canada
Date: Sun, 23 Aug 1992 23:06:02 GMT


I posted a question as:
I am trying to sort following lines (this is an example)
 
 
        the value of this line is 1
        the value of this line is 2
        the value of this line is 10
        the value of this line is 40
        the value of this line is 6
 
I want result to be like:
 
        the value of this line is 1
        the value of this line is 2
        the value of this line is 6
        the value of this line is 10
        the value of this line is 40
 
The ``sort'' give me result like:
 
        the value of this line is 1
        the value of this line is 10
        the value of this line is 2
        the value of this line is 40
        the value of this line is 6

I want to make on addition,
The strings to be sorted will not always of same length. So I can't use
the ``sort -n +6'' command. I know that sort goes character by character.
How to tell sort that when ever it encounters a numerical value, treat 
it as whole number and not go digit by digit there. 
(I could have strings of varrying length with numbers not necessarily
appearing at the end always so I cand use sort -n +6 etc)

thanks
--nasir
umnoor@ccu.umanitoba.ca
From: jtillema@lpl.arizona.edu (John Tillema)
Newsgroups: comp.unix.questions
Subject: Circuit Layout Programs...
Keywords: circuit,layout
Date: 17 Aug 92 18:51:01 GMT
Organization: University of Arizona UNIX Users Group

Does anyone know of a circuit layout package (say like Orcad for
the PC or LogicWorks for the Mac) that would run on UNIX, more
specifically on a Sun SparcStation running SunOS 4.1.2 & X11r4?
Are there any GNU products (or ones with similar  costs -- or 
at least cheap) that do this?  If not what are good and/or inexpensive
commercial products for UNIX?

Thanks
John
jtillema@panda.lpl.arizona.edu
jtillema@lpl.arizona.edu
Newsgroups: comp.unix.questions
From: collberg@dna.lth.se (Christian S. Collberg)
Subject: How do I find out the amount of Ethernet traffic?
Organization: Department of Computer Science, Lund University
Date: Fri, 14 Aug 1992 07:31:29 GMT

Is there some (SunOS) function which returns the amount of traffic on the 
Ethernet? Perfmeter must be using such a function.

Chris


-- 
Christian.Collberg@dna.lth.se
Department of Computer Science, Lund University, BOX 118, S-221 00 LUND, Sweden
From: osycs@giac1.oscs.montana.edu (Craig Spannring)
Newsgroups: comp.unix.questions
Subject: Re: problem with vi..
Keywords: n
Date: 17 Aug 92 19:11:33 GMT
Article-I.D.: coe.1992Aug17.191133.11116
Organization: Geographic Information & Analysis Center Montana State University

In article <1992Aug17.155121.21926@njitgw.njit.edu> cxk6819@hertz.njit.edu (K. Chandrakanth) writes:
>Dear netters,
>	 I have a sparc workstation 2.
>I mounted the floppy drive and copied few files from the floppy. But
>when I viewed through vi I happened to see ^M at the end of each line.

I would assume that at some point the file was edited in the evil
operating system MS-DOS.  MS-DOS seperates all lines in a text file
with a <CR><LF>.  Unix on the other had uses only a <LF>.  To remove
the <CR>'s from the end of each line run the files through a program
called dos2unix.

-- 
====================================================================
 Six of one, 110 (base 2) of       | Craig Spannring
 another.                          | osycs@giac1.oscs.montana.edu
 ----------------------------------+--------------------------------
Newsgroups: comp.unix.questions
From: phd85@seq1.keele.ac.uk (D.H. Holden)
Newsgroups: comp.unix.questions
Subject: vi (cut and paste)
Keywords: vi
Date: 17 Aug 92 14:39:04 GMT
Organization: University of Keele, England


 hi, 
    Does anyone know how you cut a range of text to one
   
    of the named buffers, where the range does not cover
 
   an integer number of lines, i.e., 

  How do i cut from here > text  text text ..........

  ............... n number of lines .....

 ...... to here <  into the named buffer "a for example?

    Cheers,

              Dave.
Newsgroups: comp.unix.questions
From: fwp@CC.MsState.Edu (Frank Peters)
Subject: Re: Swap space usage..??
Organization: Computing Center, Mississippi State University
Date: Thu, 20 Aug 1992 15:18:48 GMT

In article <27434@sophia.inria.fr> rriv@oural.inria.fr (Robert Riviere) says:
: 
: myhost% pstat -T
 [ ... ]
: 27060/60972 swap
: 
: ...~60 Mo of swap...
: 
: myhost% pstat -s
: 21312k allocated + 5588k reserved = 26900k used, 34072k available
: ...still 60 Mo...

These reflect the total swap space available on your system.

: myhost%dmesg|grep sd0b
: swap on sd0b fstype spec size 40500K
: dump on sd0b fstype spec size 40488K

This is the size of your initial swap partition.  Look in your /etc/fstab
file for a line like:

        /dev/sd1b  swap   swap rw 0 0

(the sd1b might be a different drive and partition of course).  This
partition is added by the swapon command near the end of the boot 
process.  It is presumbably about 20MB in size and combines with 
your 40MB sd0b to make the total swap space reported by pstat.

: myhost%df
: Filesystem            kbytes    used   avail capacity  Mounted on
: ...
: swap                   36828     952   35876     3%    /tmp
: ...

I'll admit right off that I'm relatively ignorant of the formula used
to compute tmpfs space.  It seems to be total swap - allocated swap -
some reserve factor.  Allocated swap is the first number in a pstat -s
(21312k in your output above).  I have no idea how that extra reserve
factor is calculated.

As processes on your system use and free up swap the size of your
tmpfs filesystem changes.
 
: What is my swap size ? 60 Mo, 40Mo or 36 Mo ...

You have 60MB of swap, 40MB of which is in your initial sd0b swap
partition and 36MB of which is currently available to your tmpfs
mounted /tmp filesystem.

--
Frank Peters  -  UNIX Systems Programmer  -  Mississippi State University
Internet: fwp@CC.MsState.Edu  -  Phone: (601)325-7030  -  FAX: (601)325-8921
From: dmarshal@Stars.Reston.Unisys.COM ( Paramax)
Newsgroups: comp.unix.questions
Subject: SCCS Question
Date: 13 Aug 92 13:26:25 GMT
Distribution: na
Organization: Unisys Corporation, Reston, VA

Note:  This is my boss's question, so my apologies if I don't ask it well.

When you initially create an SCCS file without identification keywords,
sccs complains that you don't have any keywords and continues.  If that
file is checked out and modified such that identification keywords are
now present (such as %M%), and then the file is checked back in, sccs
*still* complains that no keywords are present.  Furthermore, the
identification keywords are not expanded as we would hope.

Is there any way to get sccs to accept keywords after the inital creation
of the SCCS file?

We would create new SCCS files with the new keywords in place, but THE MAN
has decided we ought to keep the history information we have been collecting
so far.
-- 
                                           Dave Marshall
                                           dmarshal@stars.reston.unisys.com
From: wyvern@hal.gnu.ai.mit.edu (The Wyvern)
Newsgroups: comp.unix.questions
Subject: Any way to restart tty output w/o ^Q?
Summary: CTRL-Q unusable
Keywords: stty, tty output
Date: 14 Aug 92 19:47:52 GMT
Organization: Free Software Foundation


Well, the subject pretty much says it:

Is there any way to restart terminal output that's been stopped with ^S
besides using ^Q? In my case I inadvertantly changed the start character
with stty to something untypeable. Is there an external commad that can
perhaps be redirected to the hung terminal device? I tried some different
things with stty (stty start '^Q' >/dev/ttyxx) but no luck.

(On my system stty does use 'start' and 'stop' characters rather than the
 'start/stop' alternative.)

Thanks for any help!
Xref: sparky comp.unix.questions:10240 comp.unix.internals:1721 comp.unix.admin:4627 comp.unix.misc:3318 comp.unix.wizards:3662
From: bsuresh@cs.ucsd.edu (Suresh Bollapragada)
Newsgroups: comp.unix.questions,comp.unix.internals,comp.unix.admin,comp.unix.misc,comp.unix.wizards
Subject: Questions About Unix
Keywords: processor, ethernet
Date: 21 Aug 92 02:48:10 GMT
Followup-To: poster

Hi,

 I have a couple of questions about Unix. 

1. can a program crash the processor on which it is running ? if so how?.

2. the machines (sunSparcs) in my lab are connected through an ethernet cable.
   how can i simulate a break in the cable on a machine. what i mean is  the
   machine whose cable is broken (simulated to be) should not be able to
   communicate with the rest of the world. 

i am writing an application in which i need to simulate both 1 and 2. i would
appreciate if any of you could answer these.

please send ur replies to bsuresh@cs.ucsd.edu

this is the first time i am posting an article on any of these groups. i was 
not sure on which group to post and so included many of them. i am sorry for 
any inconveniance this may cause to the users of these newsgroups.

-suresh
(bsuresh@cs.ucsd.edu)

ps:i can get root access if that is required.
Organization: K.U.Leuven - Academic Computing Center
Date: Friday, 21 Aug 1992 18:22:51 +02
From: Paul Bijnens <FFAAC09@cc1.kuleuven.ac.be>
Newsgroups: comp.unix.questions
Subject: Re: Changing file names
 <1992Aug20.104721.28955@ccu1.aukuni.ac.nz>

In article <1992Aug20.104721.28955@ccu1.aukuni.ac.nz>, ecmtwhk@ccu1.aukuni.ac.nz
(Thomas Koenig) says:
>
>jf41+@andrew.cmu.edu (Jonathan R. Ferro) writes:
>
>>bosak@netcom.com (Jon Bosak) writes:
>>> [ file name conversion: xyz920815a ==> 920815a ]
>>>
>>> Who can provide the most elegant solution using just the basic Unix
>>> tools (cp, mv, sed, awk, sh, csh)?
>
>[perl script deleted]
>
>>Unless, of course, you don't consider perl to be a "basic" Unix tool, in
>>which case you're hopelessly behind the times.  :-)
>
>On the day when all the systems I use run perl, I'll be happy to use
>that script, but I lack the disk space and the time to install perl
>myself. And no, I get to see the new day earlier than most people at the
>moment :-)

Ah, that's why I can walk in at my work about an hour later than
the rest of my collegues.  I use perl, they don't have the time
to learn it.   :-)
--
Paul Bijnens
Linguistics dept., K. University Leuven, Belgium
Polleke@cc1.kuleuven.ac.be
From: shen@athena.cs.uga.edu (Mingzuo Shen)
Newsgroups: comp.unix.questions
Subject: Andrew file system: beginer's intro?
Date: 19 Aug 92 08:35:08 GMT
Article-I.D.: athena.1992Aug19.083508.4994
Distribution: usa
Organization: University of Georgia, Athens

Hi all,

    Thanks to a few people who pointed out to me that
the HPUX on HP Apollo computers is being lively discussed
on the group comp.unix.hp.

    I recently gained access to the IBM RS/6000 cluster
at Cornell University. The "file system" they are using
upthere is called afs, which I know stands for the
Andrew file system(?). I hope somebody would please
point to a place where I can get a rudimentary introduction
to afs. Thanks in advance.

mingzuo shen
From: weinri@athena.cs.uga.edu (Kevin Weinrich)
Newsgroups: comp.unix.questions
Subject: SUMMARY: How does one write a suid *wrapper* in C to, e.g., mount a CD-ROM drive
Date: 17 Aug 92 14:46:39 GMT
Organization: University of Georgia, Athens

Got a number of good, though varying, replies (kudos to responers
follows).  Here's what I'm now using, which seems to work:
---------------------------------------------
main() {
    chdir("/usr/etc");
    execl("/usr/etc/mount","mount","-rt","nfs","helios:/cdrom",
	"/cdrom", (char *) 0);
}
---------------------------------------------
If anyone needs the texts of the original respoders, send me e-mail.

Many thanks to:
Robert Earl: rearl@piggy.ucsb.edu
Steven M. Rosen: df2tg2n@shoes.bell-atl.com
Andrew Arensburger: arensb@kong.gsfc.nasa.gov
Daniel B. Suthers: pbhya!dbsuthe@PacBell.COM 

Thanks again,
Kevin Weinrich   weinri@athena.cs.uga.edu
From: sgr@alden.UUCP (Stan Ryckman)
Newsgroups: comp.unix.questions
Subject: Re: Simple AWK question.....
Date: 21 Aug 92 17:52:27 GMT
Organization: Alden Electronics, Westboro, MA

In article <1992Aug20.192332.19720@news.eng.convex.com> tchrist@convex.COM (Tom Christiansen) writes:
|>From the keyboard of guy@Auspex.COM (Guy Harris):
|>:SV-like "du" commands don't *report* the number of kB, they report the
|>:number of half-kB.
|>
|>Can anyone explain WTF POSIX.2 decided that utilities should report
|>things in demikilobytes instead of real k which we all are more
|>likely to think in?  
|>
|>--tom

Maybe they're demiwits?  :-)

Stan.
--
This .signature has expired.  Call 1-900-YOU-FOOL to find out why.
    Stan Ryckman   sgr@alden.UUCP
Newsgroups: comp.unix.questions
From: mpalmer@encore.com (Mike Palmer)
Subject: csh equivalent of ksh function?
Date: Fri, 21 Aug 1992 12:05:41 GMT
Organization: Encore Computer Corporation

Thanks to all those who answered my "how to cd & stay" question.  I ended up
using a ksh function, but I'd like it to work in csh too.

I have the following ksh function that allows the "sdx" program to select 
a directory to change to and write the name in the home directory file:
_t_e_m_p_. The function then does a cd to that directory.  (This is the basis
of an smart directory changer.)

sd()
{
  sdx $@
  if test -f ${HOME}/_t_e_m_p_
  then
    cd `cat ${HOME}/_t_e_m_p_`
    rm ${HOME}/_t_e_m_p_
  fi
}

The simpler form "cd `sdx $@`" suggested by most, won't work because sdx
sometimes asks the user which directory he want's to move to. 

What would be the best way to do this in csh? 

Regards,
Mike palmer
Telephone: (305) 797-2326 (W)   (305) 7546-3146 (H)

Newsgroups: comp.unix.questions
From: chupchup@ferkel.ucsb.edu (Robert Earl)
Subject: Re: need help reading from a child
Organization: (EVIL!)
Date: Sat, 22 Aug 1992 06:10:05 GMT

gene@ponder.csci.unt.edu (Gene De Lisa) writes:

| This code hangs on the read (or fread).

|      if (pipe(pipefds) < 0) {
|       perror("pipe");
|       return(NULL);
|      }

	[ code deleted... ]

|       dup2(pipefds[0],0);
|       dup2(pipefds[1],1);
|       dup2(pipefds[1],2);

What you're doing here is setting up a loop: the same process that
writes to its stdout/err is going to read what it just wrote on stdin,
because writes to pipefds[1] come out on reads on pipefds[0].

You need to close pipefds[0] in the child and dup2() pipefds[1] onto
the desired fds.  Close pipefds[1] in the parent, then read from
pipefds[0].

If you actually want to write stuff to the child's stdin, make another
call to pipe() and close the uneeded descriptors in each process.  All
the usual warnings about potential deadlocks apply.  To do this right
you would need to use ptys or something similar - see the FAQ.  (Or
was that just the comp.lang.perl FAQ?)
-- 
"If you've got a pig that likes jumping fences, | robert earl
you have to make its fence a lot higher all at  | rearl@ucsd.edu
once -- if you do it by increments, all you're  | rearl@piggy.ucsb.edu
doing is training a jumping pig." -Henry Spencer|
Xref: sparky comp.unix.questions:10187 comp.editors:2038
From: sgr@alden.UUCP (Stan Ryckman)
Newsgroups: comp.unix.questions,comp.editors
Subject: Re: vi (cut and paste)
Keywords: vi
Date: 19 Aug 92 16:40:04 GMT
Followup-To: comp.unix.questions
Organization: Alden Electronics, Westboro, MA

In article <1992Aug17.200149.7817@s912%bnf.com> bibb@s912%bnf.com (Ken Bibb) writes:
>In <3815@keele.keele.ac.uk> phd85@seq1.keele.ac.uk (D.H. Holden) writes:
>> hi, 
>>    Does anyone know how you cut a range of text to one
>>    of the named buffers, where the range does not cover
>>   an integer number of lines, i.e., 
>>  How do i cut from here > text  text text ..........
>>  ............... n number of lines .....
>> ...... to here <  into the named buffer "a for example?
>>    Cheers,
>>              Dave.
>In the following texT:
>aaabbbbbb
>bbbbbbbbb
>bbbbccccc
>
>I'll assume you want to cut the b's out and save them into buffer a.
>1) position the cursor at the beginning of the range to be cut (1Gfb will work
>   in this example).
>2) ma (mark the location with marker a)
>3) move to the end of the range (Gfc will work in this example)
>4) "ad`a will cut the range and put it into buffer a

NOT!

This grabs all three full lines.  (I tried it!  Did you?)

Dave presumably wants to have the remaining text be:
aaaccccc

and the buffer to contain:
bbbbbb
bbbbbbbbb
bbbb

"Mark" (the "m" command) only marks the line, NOT the cursor
position within the line.

In this trivial example, the following works:
1) position to the beginning as Ken suggests (1Gfb);
2) type the command "ad/c
   which will delete up to the first "c" character, putting the
   deletions into the buffer.

However, in the general case this doesn't work; suppose you
want all the b's PLUS the first c to be cut.  Then,
   "ad2/c
won't work (vi doesn't allow a number before the / command).
Yes, here you could do
   "ad/cccc$
and, in most cases, something can be found to work.  But to my
mind, there's no way to put the cursor at one arbitrary mid-line
point, type something, then position to another arbitrary mid-line
point, and then delete the in-between-text into a named buffer.

Am cross-posting to comp.editors, since someone there may know
for sure whether there _is_ a way to do this, and if I'm wrong I'd
like to know.  But please, _TRY_ it before posting!

Stan.
--
This .signature has expired.  Call 1-900-YOU-FOOL to find out why.
    Stan Ryckman   sgr@alden.UUCP
From: zzang@whale.stat.ufl.edu (Zhuo Zang)
Newsgroups: comp.unix.questions
Subject: diff clone for DOS wanted
Keywords: Zmodem modem stty tty
Date: 13 Aug 92 12:49:17 GMT
Distribution: usa
Organization: University of Florida

Hello,
I try to find a good diff clone for PC.
I checked Simtel <txtutl>, it has several
program. But they aren't doing the exactly
the same as the Unix diff.
( one is doing nearly as good, but it makes
mistakes very often )

Could someone direct me a good one ?

Thanks in advance!

I will post the results if I find one.


zhuo
Newsgroups: comp.unix.questions
From: mvp@hsv3.lsil.com (Mike Van Pelt)
Subject: Re: vi (cut and paste)
Keywords: vi
Organization: LSI Logic/Headland Technology
Date: Fri, 21 Aug 1992 18:37:41 GMT

In article <515@alden.UUCP> sgr@alden.UUCP (Stan Ryckman) writes:
>In article <1992Aug17.200149.7817@s912%bnf.com> bibb@s912%bnf.com (Ken Bibb) writes:
>>In <3815@keele.keele.ac.uk> phd85@seq1.keele.ac.uk (D.H. Holden) writes:
>>>  How do i cut from here > text  text text ..........
>>>  ............... n number of lines .....
>>> ...... to here <  into the named buffer "a for example?

>>1) position the cursor at the beginning of the range to be cut (1Gfb will work
>>   in this example).
>>2) ma (mark the location with marker a)
>>3) move to the end of the range (Gfc will work in this example)
>>4) "ad`a will cut the range and put it into buffer a
>
>NOT!
>This grabs all three full lines.  (I tried it!  Did you?)

I just tried it, and it worked for me.

Did you use d`a or d'a?  'a moves to the beginning of the
marked line, `a moves to the marked character.

I'm in vi now, and trying it.

Here's my test case:

------------------------------
cut everything from < to the
corresponding end marker
character > in another line.
------------------------------

OK, copy it, and try it out.
ma and mb are set on the < and > characters.
Then I type `a"a`b and here's the result.

------------------------------
cut everything from > in another line.
------------------------------

The trailing marker character is not cut, so this must
affect your selection of where to set the ending mark.

Here's the contents of "a

------------------------------
< to the
corresponding end marker
character 
------------------------------
-- 
Let's face it, when it comes to utilities,  Microsoft has | Mike Van Pelt
performed about as well as a savings and loan.  These are | Headland Tech.
the guys,  remember,  who put BACKUP and RESTORE - not to | mvp@hsv3.lsil.com
mention EDLIN - on your hard disk.  - Lincoln Spector     +----
From: bill@wafbox.UUCP (Bill Fulton)
Newsgroups: comp.unix.questions
Subject: Re: Associative arrays in [gn]awk --whynot! (long but interesting)
Date: 16 Aug 92 05:29:35 GMT
Reply-To: bill@wafbox.UUCP (Bill Fulton)
Organization: Home

In article <1992Aug15.021954.27159@news.acns.nwu.edu> navarra@casbah.acns.nwu.edu (John Navarra) writes:
>In article <1992Aug14.173952.12112@mccc.edu> pjh@mccc.edu (Pete Holsberg) writes
>>In article <1992Aug13.063348.11691@news.acns.nwu.edu> navarra@casbah.acns.nwu.edu (John Navarra) writes:
>>=======================
>>=Basically, associative arrays in gn[awk] are 
>>=unreliable (especially for a multi-field file).
>>
>>Unreliable? In what way?
>
>	With respect to order being read in. Obviously, many of you know
>that this is a well-known bug. Some do not.

I thought that this was defined behaviour - from AWK book, page 51:
	"The order in which the subscripts are considered is implementation
	dependent."

This would seem to allow the implementation latitude to arrange the elements
in the most efficient method, e.g. for look-up (hashed lists, etc).

-- 
Bill Fulton            (Home Alone) |    Grab .. 
    bill@wafbox.gwinnett.com        |            The ..
OR  ..!gatech!dcatla!wafbox!bill    |                   Reins
From: 754clifton@gw.wmich.edu
Newsgroups: comp.unix.questions
Subject: Using find w/ -exec and -ls
Date: 18 Aug 92 20:30:42 EST
Organization: Western Michigan University

I'm trying to use find with [fe]grep to find all files of a certain extension
that contain a string or regex and then print their names only in a ls -l
format. The problem I am having is that _all_ the files are printed rather
than just the ones that return 0 from grep. This is what I tried:

	% find / -type f -name \*.ext -exec grep -s regex \{\} \; -ls

What am I doing wrong? The only solution I've been able to come up with is to
us xargs to pipe (replace grep -s w/ -l) the output of above minus the -ls
switch to the real ls program. However, in the situation that I want to use this
command line, pipes are not feasable. Also using a pipe to xargs slows this
(already slow) command down.

Anyone?

/Doug
--
Douglas Clifton [99clifto@lab.cc.wmich.edu] 
Newsgroups: comp.unix.questions