- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- /dev/zero on HP-UX 11
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-08-2001 12:49 PM
05-08-2001 12:49 PM
/dev/zero on HP-UX 11
I use some versions of UNIXes,
but under HP-UX, I miss something
like '/dev/zero' a device producing
0x00 characters. I often use
this to wipe out devices with `dd',
etc...
Is there a similar device in HP-UX ?
What is '/dev/nuls' (the read is
blocking, when I try to use) ?
With friendly regards
Christoph Plattner
-------------------------
private:
christoph.plattner@gmx.at
company:
christoph.plattner@alcatel.at
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-08-2001 01:39 PM
05-08-2001 01:39 PM
Re: /dev/zero on HP-UX 11
Do an ls /dev/zero.
If not found then we will build one.
cd /dev
mknod zero c 3 0x000004
chown bin:sys zero
chmod 666 zero
On 10.20, I think the correct minor device no. is 0x000003 but everything else is the same.
To test:
dd if=/dev/zero bs=1k count=2 of=/tmp/xx
That should create 1 2k zero'ed file.
Regards, Clay
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-09-2001 04:20 AM - last edited on 03-24-2017 02:11 AM by VidyaVI
05-09-2001 04:20 AM - last edited on 03-24-2017 02:11 AM by VidyaVI
Re: /dev/zero on HP-UX 11
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-09-2001 06:15 AM
05-09-2001 06:15 AM
Re: /dev/zero on HP-UX 11
I use /dev/null for those purposes.
If I test a disk for example I use dd if= .... of=/dev/null.
Hope that helps,
Steffi Jones
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-15-2001 04:24 AM
05-15-2001 04:24 AM
Re: /dev/zero on HP-UX 11
the correct command to create /dev/zero is
"mknod /dev/zero c 3 3"
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-11-2002 08:28 AM
07-11-2002 08:28 AM
Re: /dev/zero on HP-UX 11
dd if=/dev/null bs=1k count=2 of=/tmp/xx
When I used /dev/null the file length was zero, and of course contained no data.
dd listed:
0+0 records in
0+0 records out
Next I created /dev/zero using:
mknod /dev/zero c 3 4
chown bin:sys /dev/zero
chmod 666 /dev/zero
Then tested with
dd if=/dev/zero bs=1k count=2 of=/tmp/xx
dd listed:
2+0 records in
2+0 records out
This time /tmp/xx had size:
-rw-r--r-- 1 root sys 2048 Jul 11 11:12 /tmp/xx
This is probably what you want as it will over write the data that is on the disk instead of discarding the output.
I have seen some discrepancy with the minor numbers. I have an 11.0 workstation an it did not have a /dev/zero. On another 11i box fresh from the factory it has a /dev/zero and has minor of 4 instead of 3 that I've seen listed elsewhere. I used 4 in my test since that was on a fresh install of 11i. It may work with minor of 3 as well, but I didn't test. I tested using an 11.0 box.
For anyone that doesn't know mknod /dev/zero
I know this is an old thread, but wanted to clarify in case anyone else ran across this thread.
Bryan Payne
Senior Unix Admin
Levi Strauss
bryan_payne@yahoo.com
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-11-2002 08:30 AM
07-11-2002 08:30 AM
Re: /dev/zero on HP-UX 11
mknod /dev/zero
Should be:
mknod /dev/zero c