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.
2>/dev/null
you dont talk to dev null... it only talks to you...
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 &".
/dev/hda usually refers to the first ATA hard drive in a workstation or server.
cat /dev/null > file22
Just add this to the end of the crontab line > /dev/null 2>&1
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).
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.
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
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.
cp myfile /dev/null if it does not exist it will give you : cp: cannot stat `myfile': No such file or directory
Answer:Linux and Unix store their devices in /dev. Character and Block devices are there (all devices for that matter).That said, it should be understood that devices are treated somewhat differently under Linux/Unix than some other operating systems. On a Linux/Unix system, all devices are treated as a file, hence the /dev directory and all of the files that reside in it. You may notice that an 'ls -al' listing of /dev produces different output than it does in other directories. Instead of file sizes you'll see the device major and minor numbers. These are represented by the bold type below for the console device.crw------- 1 root root 5, 1 Sep 11 10:41 consoleIf you write a program to open the /dev/console and write to it, whatever is written to the device will show up on the machine's console terminal. [JMH]