- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: Two null or not two null, that is the question...
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
03-14-2005 09:19 AM
03-14-2005 09:19 AM
/dev/null
/dev/nuls
What is /dev/nuls used for?
Also, found the following files under /dev on a few servers here and there. I'm assuming these are just programmer mistakes and can be removed?
nul
null (regular file)
null`
null0
null2
null^M
How do you delete the /dev/null regular file? By inode?
Thanks.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-14-2005 09:24 AM
03-14-2005 09:24 AM
Re: Two null or not two null, that is the question...
I found this on my favorite search engine:
"/dev/nuls"
The STREAMS null device. This device frees all data passed to it from downstream or upstream and NAKs all ioctl requests.
If the other devices are just regular files you can remove them by inode. The one named null could make life fun. I've had one or two of those before and eventually some big process runs some redirection to it and fills up the / filesystem. Fun!
JP
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-14-2005 09:28 AM
03-14-2005 09:28 AM
Re: Two null or not two null, that is the question...
To recreate /dev/null (assuming this is an 11x box) after rm'ing /dev/null:
mknod /dev/null c 3 0x02
chmod 666 /dev/null
chown bin:bin /dev/null
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-14-2005 09:29 AM
03-14-2005 09:29 AM
Re: Two null or not two null, that is the question...
cat /dev/nuls ... (never seems to return until ctrl-c)
cat /dev/null (returns immediately).
Also tried
cat /dev/null | od -- returns
00000000
cat /dev/nuls | od -- doesn't return...
Looks like nuls is what the prior poster said - a stream of NUL (maybe even NULs).
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-14-2005 09:40 AM
03-14-2005 09:40 AM
SolutionNice to zero out a raw disk
dd if=/dev/zero of=/dev/rdsk/c0t2d4 bs=4194
HP-UX 10.20:
d3:/u/usr/merijn 103 > ll /dev/nul* /dev/zer*
63 crw-rw-rw- 1 bin bin 3, 2 Mar 14 22:10 /dev/null
1398 crw-rw-rw- 1 root sys 3, 3 Apr 26 2002 /dev/zero
d3:/u/usr/merijn 104 >
HP-UX 11.00:
a5:/u/usr/merijn 103 > ll /dev/nul* /dev/zer*
74 crw-rw-rw- 1 bin bin 3, 2 Mar 14 23:36 /dev/null
680 crw-rw-rw- 1 root root 72, 10 Feb 15 11:15 /dev/nuls
1868 crw-rw-rw- 1 root sys 3, 3 Jan 27 2004 /dev/zero
a5:/u/usr/merijn 104 >
HP-UX 11.11:
r3:/u/usr/merijn 101 > ll /dev/nul* /dev/zer*
66 crw-rw-rw- 1 bin bin 3, 2 Mar 14 23:32 /dev/null
70 crw-rw-rw- 1 root root 72, 25 Feb 15 11:10 /dev/nuls
752 crw-rw-rw- 1 bin sys 3, 4 Nov 15 2000 /dev/zero
r3:/u/usr/merijn 102 >
SuSE 9.2 Linux:
lt09:/home/merijn 109 > ll /dev/nul* /dev/zer*
36598 crw-rw-rw- 1 root root 1, 3 2004-04-06 15:27 /dev/null
41334 crw-rw-rw- 1 root root 1, 5 2004-04-06 15:27 /dev/zero
lt09:/home/merijn 110 >
AIX 5.2.0.0:
i4:/u/usr/merijn 101 > ll /dev/nul* /dev/zer*
4183 crw-rw-rw- 1 root system 2, 2 Mar 14 17:39 /dev/null
4298 crw-rw-rw- 1 root system 13, 36 Jul 21 2004 /dev/nuls
4223 crw-rw-rw- 1 root system 2, 3 Jul 21 2004 /dev/zero
i4:/u/usr/merijn 102 >
AIX 4.3.0.0:
i2:/u/usr/merijn 103 > ll /dev/nul* /dev/zer*
4155 crw-rw-rw- 1 root system 2, 2 Mar 14 23:40 /dev/null
4321 crw-rw-rw- 1 root system 13, 30 Jul 29 1999 /dev/nuls
4181 crw-rw-rw- 1 root system 2, 3 Jul 29 1999 /dev/zero
i2:/u/usr/merijn 104 >
Enjoy, Have FUN! H.Merijn
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-14-2005 10:30 AM
03-14-2005 10:30 AM
Re: Two null or not two null, that is the question...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-14-2005 11:19 AM
03-14-2005 11:19 AM
Re: Two null or not two null, that is the question...
Just a recommendation.
Do not use rm for removing device files.
The better way is to use rmsf.
Please, read the manpage rmsf(1m) and you will know.
Roland
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-14-2005 11:44 AM
03-14-2005 11:44 AM
Re: Two null or not two null, that is the question...
find /dev -type f -exec ll {} \;
Bill Hassell, sysadmin