Sponsored Content
Full Discussion: /dev/null file issue
Operating Systems AIX /dev/null file issue Post 302772394 by Corona688 on Monday 25th of February 2013 10:44:02 AM
Old 02-25-2013
Take my advice with a grain of salt since I'm not an AIX expert, but: Having a /dev/null that is not a character device could be a big problem, yes! Things might create huge files in it, expecting them to go into the bit bucket, but actually ending up on disk instead... Some memory mapping things might not work right... etc.

You're generally not supposed to delete anything in /dev/, no. But when things are messed up like this, don't know what else you're supposed to do.

See those numbers there, 2,2? They're what make /dev/null act like /dev/null and not be some other device. You give those to mknod when you create it, and also give it c to tell it it's a character device and not a block one.

Code:
rm /dev/null ; mknod -m 0666 /dev/null c 2 2 ; chown root:system /dev/null


Last edited by Corona688; 02-25-2013 at 11:51 AM..
This User Gave Thanks to Corona688 For This Post:
 

10 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

Has anyone seen this issue with the /dev/null?

hello all, I am working in a Hpux 11.0 64 bit environment. I am not sure if a third party software is doing this or not, but the admin to this server says it is not a server issue as he has check and double check logs and crons to verify this issue. My problem, is that every now and then, once... (4 Replies)
Discussion started by: oott
4 Replies

2. UNIX for Dummies Questions & Answers

Creating a file / /dev/null

First of all, hello there cOmMuNity ! :cool: Well, I've got two basic questions: 1) In how many ways it's possible to create a file ? I know one manner using "touch", other typing something like echo "" > file ... The fact is that I need to overwrite the file if it exists, and touch... (8 Replies)
Discussion started by: 435 Gavea
8 Replies

3. UNIX for Advanced & Expert Users

Q1 :/dev/null Q2 -A

Hi, Q1-What does nroff -ms > /dev/null Q2- What does mean -A under STAT column : ps aux |head -20 UTIL PID %CPU %MEM SZ RSS TTY STAT STIME TIME COMMAND root 516 93,0 0,0 12 12 - A 04 nov 3906:51 wait Thank you. (4 Replies)
Discussion started by: big123456
4 Replies

4. Solaris

URGENT - setup port and dump all output to /dev/null or a file

Please help urgently. I need to setup up some sort of service on a solaris server on a port. I dont need it do anything special, anything that is sent to this port from an external server should be dump to /dev/null or a flat file.. Can you help urgently? (1 Reply)
Discussion started by: frustrated1
1 Replies

5. UNIX for Advanced & Expert Users

/dev/NULL can't open this file ??

when i write the following two statements : cp /dev/NULL /clocal/mqbrkrs/user/mqsiadm/sanjay/dspmq_temp cat /dev/NULL > /clocal/mqbrkrs/user/mqsiadm/sanjay/dspmq_temp its gives me errors like : cp: /dev/NULL: A file or directory in the path name does not exist. cat : /dev/NULL can't open... (2 Replies)
Discussion started by: varungupta
2 Replies

6. Solaris

What is /dev/tty /dev/null and /dev/console

Hi, Anyone can help My solaris 8 system has the following /dev/null , /dev/tty and /dev/console All permission are lrwxrwxrwx Can this be change to a non-world write ?? any impact ?? (12 Replies)
Discussion started by: civic2005
12 Replies

7. UNIX for Dummies Questions & Answers

/dev/null 2>&1 Versus /dev/null 2>1

How are these two different? They both prevent output and error from being displayed. I don't see the use of the "&" echo "hello" > /dev/null 2>&1 echo "hello" > /dev/null 2>1 (3 Replies)
Discussion started by: glev2005
3 Replies

8. UNIX for Dummies Questions & Answers

/dev/null a file using xargs

Hi, I'm currently using the following command to wipe clean a log file which can't be straight out RM'd: cat /dev/null > server.log I'm building this into a script and I'm current working on a command to run on each machine to do this automatically however I have multiple files so I need... (11 Replies)
Discussion started by: Deehem
11 Replies

9. Shell Programming and Scripting

Redirecting standard out to /dev/null goes to file "/dev/null" instead

I apologize if this question has been answered else where or is too elementary. I ran across a KSH script (long unimportant story) that does this: if ; then CAS_SRC_LOG="/var/log/cas_src.log 2>&1" else CAS_SRC_LOG="/dev/null 2>&1" fithen does this: /usr/bin/echo "heartbeat:... (5 Replies)
Discussion started by: jbmorrisonjr
5 Replies

10. AIX

Size of file /dev/./null 2>&1

Hello Can I just remove/delete flile ? rw-r--r-- 1 root system 2385088512 Jun 30 21:25 /dev/null 2>&1 size of this flile is 2274.75 m and fill up my filesystem: Filesystem MB blocks Used Free %Used Mounted on /dev/hd4 2560.00 2558.59 1.41 100% / (10 Replies)
Discussion started by: primo102
10 Replies
HD(4)							     Linux Programmer's Manual							     HD(4)

NAME
hd - MFM/IDE hard disk devices DESCRIPTION
The hd* devices are block devices to access MFM/IDE hard disk drives in raw mode. The master drive on the primary IDE controller (major device number 3) is hda; the slave drive is hdb. The master drive of the second controller (major device number 22) is hdc and the slave hdd. General IDE block device names have the form hdX, or hdXP, where X is a letter denoting the physical drive, and P is a number denoting the partition on that physical drive. The first form, hdX, is used to address the whole drive. Partition numbers are assigned in the order the partitions are discovered, and only non-empty, non-extended partitions get a number. However, partition numbers 1-4 are given to the four partitions described in the MBR (the `primary' partitions), regardless of whether they are unused or extended. Thus, the first logi- cal partition will be hdX5. Both DOS-type partitioning and BSD-disklabel partitioning are supported. You can have at most 63 partitions on an IDE disk. For example, /dev/hda refers to all of the first IDE drive in the system; and /dev/hdb3 refers to the third DOS `primary' partition on the second one. They are typically created by: mknod -m 660 /dev/hda b 3 0 mknod -m 660 /dev/hda1 b 3 1 mknod -m 660 /dev/hda2 b 3 2 ... mknod -m 660 /dev/hda8 b 3 8 mknod -m 660 /dev/hdb b 3 64 mknod -m 660 /dev/hdb1 b 3 65 mknod -m 660 /dev/hdb2 b 3 66 ... mknod -m 660 /dev/hdb8 b 3 72 chown root:disk /dev/hd* FILES
/dev/hd* SEE ALSO
mknod(1), chown(1), mount(8), sd(4) Linux 1992-12-17 HD(4)
All times are GMT -4. The time now is 02:47 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy