answersLogoWhite

0

What is dev null in unix?

Updated: 11/11/2022
User Avatar

Wiki User

15y ago

Best Answer

This is one of the special UNIX type operating system devices called null device. It also could be referred as trash bit, bit bucket and other names. All data redirected to this device will be deleted instantly and you can not read from this device. It is used when you have some generated data and you do not need all of it then you redirect some streams (stdin, stderr,...) to /dev/null and forget it.

User Avatar

Wiki User

15y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: What is dev null in unix?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

What do you use forward errors to a file in UNIX?

2>/dev/null


How do you talk with dev null?

you dont talk to dev null... it only talks to you...


Where can you buy a hydrogen fluoride?

/dev/null


How do you run daemon process?

In Unix, with a C program you can run a quick function to do this. There is an example at:(link moved to link section)AnswerIn Solaris, you need to disconnect your program from your "terminal" ( scripts generally inherit the stdin, stdout, and stderr of your shell when you execute them ). For a shell program you can execute "nohup $program < /dev/null > /dev/null 2>&1 &". Or the shell program can redirect its own stdin, stdout, and stderr -- then you can execute "nohup $program &".


What is hda in unix?

/dev/hda usually refers to the first ATA hard drive in a workstation or server.


How do you stop a crontab from emailing you?

Just add this to the end of the crontab line &gt; /dev/null 2&gt;&amp;1


How can I Create a file named file22 using the command cat and redirections?

cat /dev/null &gt; file22


What does levtty mean?

Some context might help. The closest thing I can think of is /dev/tty, which is a unix-style device name (in unix, printers, terminals, and the like are treated as files).


What is a root partition?

A "root partition" is a partition that contains the subdirectories that make up a Linux or Unix file system, such as /bin, /usr, and /dev.


How do you mount CD drive in SCO open server unix?

To mount a CD in SCO Open server UNIX: login as root make a directory named cdrom then # mount -f HS,lower /dev/cd0 /cdrom


Which os treats hardware as a file system?

UNIX Q.How are devices represented in UNIX? A.Devices in UNIX are represented by files. These are special files located in the )dev directory. Hence in UNIX, every piece of hardware is a file. This device file allows us to access the hardware.UNIX represents all devices as files. These files are located in the directory /dev. That is why the devices and other files are accessed in a similar way.Devices file which is specified as 'block special file' with some similar characters of a disk file. A device which is specified as a 'character special file' with some characteristics that is similar to a keyboard.For instance, the following command; Less -f /dev/hda is not a file in the 'real' sense. When read, it is actually reading directly from the first physical hard disk of your machine.


Which commands can be used to assure that a file 'myfile' exists?

cp myfile /dev/null if it does not exist it will give you : cp: cannot stat `myfile': No such file or directory