>
Syntax: file_descriptoropt >
file_name>&
Syntax: file_descriptoropt >&
file_descriptor&>
Syntax: &>
file_name&
means whatever follows is a file descriptor, not a filename)&>
will redirect all (STDOUT and STDIN)2>&1
simply says redirect STDERR
to STDOUT
Device nodes on Unix-like systems do not necessarily have to correspond to physical devices. Nodes that lack this correspondence form the group of pseudo-devices. They provide various functions handled by the operating system. Some of the most commonly used (character-based) pseudo-devices include:
/dev/null
– accepts and discards all input; produces no output (always returns an end-of-file indication on a read)/dev/zero
– accepts and discards all input; produces a continuous stream of NUL (zero value) bytes/dev/full
– produces a continuous stream of NUL (zero value) bytes when read, and returns a "disk full" message when written to/dev/random
and /dev/urandom
– they produce a variable-length stream of pseudo-random numbers.