Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

10.* missing /dev/zero

48 views
Skip to first unread message

kenneth s cameron

unread,
May 2, 1997, 3:00:00 AM5/2/97
to

HPUX doesn't seem to have a /dev/zero like most Unix systems. I have looked
on both 10.10 and 10.20. I have some software to port that expected to
find it. What do people do in HPUX for a null data source??

--
-ken cameron, CCP. Employer: Computer Task Group.
Disclaimer: "<under construction>". UNIFORUM /cny Users Group Director.
SkyDiver: Zoo-602, A-8596, D-11839. Skier down&cross. English Hunter Rider.
Internet: kcam...@ctg.com Home DZ: FingerLakes Skydivers, Ovid NY

The Mercenary Hacker

unread,
May 2, 1997, 3:00:00 AM5/2/97
to

> HPUX doesn't seem to have a /dev/zero like most Unix systems. I have looked
> on both 10.10 and 10.20. I have some software to port that expected to
> find it. What do people do in HPUX for a null data source??


HPUX doesn't have a /dev/zero. It has something similar, which may
work for you. You can call it /dev/full or whatever you like, and
reading from it returns as much data as you asked for, but it is not
zeroed. The device file looks just like /dev/null except the minor
number is 3.


--
Rob Gardner r...@fc.hp.com
Hewlett Packard 970-229-2048
Fort Collins, Colorado


Disclaimer and Copyright Notice: This article is intended for
educational (or recreational) purposes only, and is the property of
Rob Gardner. It may not be published elsewhere in any form without
the consent of the author. Don't make me mad.

Matthias Zander

unread,
May 8, 1997, 3:00:00 AM5/8/97
to

Hi Ken,

try /dev/null

Ųyvind Gjerstad

unread,
May 9, 1997, 3:00:00 AM5/9/97
to

"Matthias Zander" <mza...@comlineag.de> writes:

Sorry, but /dev/null has nothing to do with /dev/zero. If you read from
/dev/null you get EOF, but /dev/zero returns '\0' characters.

On writing they behave the same, though.

Don't know why HP-UX has no /dev/zero. Should be fairly easy to provide.

--
Øyvind Gjerstad Systems dept Tollpost-Globe AS N-6301 Åndalsnes/Norway
E-mail: o...@it.tollpost.no Phone: +47 7122 6663 Fax: +47 7122 6694

The Mercenary Hacker

unread,
May 9, 1997, 3:00:00 AM5/9/97
to


> Don't know why HP-UX has no /dev/zero. Should be fairly easy to provide.


It is. Does anyone really want a /dev/zero badly enough to install a driver
for it? Send me email if you are a candidate and would be willing to test
it.

kenneth s cameron

unread,
May 9, 1997, 3:00:00 AM5/9/97
to

I did get an answer to the /dev/zero issue. Someone (I misplaced the copy)
from within HP nicely looked into the kernel code and found the minor device
number to use (mkdev /dev/zero c 3 3) but also indicated that it isn't a
guarantee of just zeros. But so far it works just great as a source of zeros.
Unfortunately he also said it isn't a documented feature so I wonder how long
before the minor number might magically change.

This may be a good thing for the FAQ to pick up.

Steven Wishart

unread,
May 9, 1997, 3:00:00 AM5/9/97
to

I hate to disappoint you but most Unix's don't have
/dev/zero. You probably find somebody like zero
and linked /dev/null to /dev/zero.

As below it is /dev/null

Cheers
--
Steven Wishart
European Bank for Reconstruction and Development
One Exchange Square, London, EC2A 2EH, United Kingdom

Tel: ++44-171-338-6712 E-Mail: wish...@ebrd.com
Fax: ++44-171-338-6714 WWW: http://www.ebrd.com
Mob: ++44-468-894-993


Matthias Zander <mza...@comlineag.de> wrote in article
<01bd7b28$111e2b20$64fc71c2@matzhome>...

Vic Abell

unread,
May 9, 1997, 3:00:00 AM5/9/97
to

"Steven Wishart" <wish...@ebrd.com> writes:

>I hate to disappoint you but most Unix's don't have
>/dev/zero. You probably find somebody like zero
>and linked /dev/null to /dev/zero.

I'm sorry, but my quick survey says that the above statement isn't
true. Most recent UNIX dialect releases *do* have a distinct
/dev/zero. Look at these lists of ones I just examined:

Tested UNIX dialects that have a distinct /dev/zero (i.e., not
linked to /dev/null):

AIX 4.1.4
AIX 4.2
DEC OSF/1 2.0
DEC OSF/1 3.2
BSDI BSD/OS 2.1
FreeBSD 2.1.6
FreeBSD 2.1.7
FreeBSD 3.0-CURRENT
IRIX 5.3
IRIX 6.2
IRIX 6.4
Linux 2.1.35
NetBSD 1.2C (i386)
NetBSD 1.2D (sparc)
OpenBSD 2.1 (i386)
Pyramid DC/OSx 1.1
Pyramid Reliant UNIX 5.43
Sequent PTX 4.2.1
Sequent PTX 4.3.0
Solaris 2.4
Solaris 2.5
Solaris 2.5.1
Solaris 2.6 (Beta)
SunOS 4.1.3C
UnixWare 2.1.1 (i386)

Tested UNIX dialects that have no /dev/zero:

HP-UX A.09.01
HP-UX B.10.20
NeXTSTEP 3.1
RISCos 4.52 (MIPS)
SCO OpenServer 3.0 (3.2v4.2)
Sequent PTX 2.1.9
Ultrix 4.2 RISC

The NeXTSTEP 3.1, RISCos 4.52, SCO R3.0, Sequent PTX 2.1.9, and
Ultrix 4.2 releases are fairly old. The first list shows that
Sequent, for example, added /dev/zero in its more recent PTX 4.x.

Vic Abell <a...@purdue.edu>

Bryan Althaus

unread,
May 10, 1997, 3:00:00 AM5/10/97
to

Vic Abell (a...@cc.purdue.edu) wrote:
:
Odd that HP-UX and SCO are working on a new kernel! :^)


Vic Abell

unread,
May 10, 1997, 3:00:00 AM5/10/97
to

br...@panix.com (Bryan Althaus) writes:

>Vic Abell (a...@cc.purdue.edu) wrote:
>:
>: Tested UNIX dialects that have no /dev/zero:
>:
>: HP-UX A.09.01
>: HP-UX B.10.20

>:...
>: SCO OpenServer 3.0 (3.2v4.2)


>:
>Odd that HP-UX and SCO are working on a new kernel! :^)

Odd, too, that Bryan failed to cite the last paragraph of my posting
which said:

The NeXTSTEP 3.1, RISCos 4.52, SCO R3.0, Sequent PTX 2.1.9, and
Ultrix 4.2 releases are fairly old. The first list shows that
Sequent, for example, added /dev/zero in its more recent PTX 4.x.

As a matter of record, I've since visited a current SCO system,
running R5.0 (3.2v5.0.0), and determined that it *does* have distinct
/dev/null and /dev/zero files.

In all likelihood no connection exists between the absence of
/dev/zero in all HP-UX releases, the absence of it in a previous
SCO release, the presence of it in the current SCO release, and
the joint HP-SCO 64 bit UNIX venture.

My apologies to SCO if my earlier omission and Bryan's truncated
citation of it appeared critical of the current SCO UNIX product.

Vic Abell <a...@purdue.edu>

Bryan Althaus

unread,
May 10, 1997, 3:00:00 AM5/10/97
to

Vic Abell (a...@cc.purdue.edu) wrote:

: br...@panix.com (Bryan Althaus) writes:
:
: >Vic Abell (a...@cc.purdue.edu) wrote:
: >:
: >: Tested UNIX dialects that have no /dev/zero:
: >:
: >: HP-UX A.09.01
: >: HP-UX B.10.20
: >:...
: >: SCO OpenServer 3.0 (3.2v4.2)
: >:
: >Odd that HP-UX and SCO are working on a new kernel! :^)
:
: Odd, too, that Bryan failed to cite the last paragraph of my posting
: which said:

No harm was intended. I didn't see HP-UX in there so I clipped it (this
being an HP-UX group.) I could care less about SCO of any release.
Also note the smiley....

:
: The NeXTSTEP 3.1, RISCos 4.52, SCO R3.0, Sequent PTX 2.1.9, and


: Ultrix 4.2 releases are fairly old. The first list shows that
: Sequent, for example, added /dev/zero in its more recent PTX 4.x.
:
: As a matter of record, I've since visited a current SCO system,
: running R5.0 (3.2v5.0.0), and determined that it *does* have distinct
: /dev/null and /dev/zero files.
:
: In all likelihood no connection exists between the absence of
: /dev/zero in all HP-UX releases, the absence of it in a previous
: SCO release, the presence of it in the current SCO release, and
: the joint HP-SCO 64 bit UNIX venture.
:
: My apologies to SCO if my earlier omission and Bryan's truncated
: citation of it appeared critical of the current SCO UNIX product.

:
Again note the smiley. As for being critical of SCO and HP-UX,
I am. Both OS's have lagged over the years to say Solaris or even NT.
They might be fine systems to run apps on, but development is not fun.


0 new messages