[LINUX] Black hole called / dev / null

This article is the article of tut Advent calendar 2019 ~~.

Black hole of any output

There is a black hole-like file called / dev / null on linux. If you specify it as the output redirect destination of the command, the data output there will be lost. Also, if you use it as an input redirect, nothing will come back.

Be scared.

qiita:~$ ls /dev/null
/dev/null
qiita:~$ cat /dev/null
qiita:~$ cat /bin/cat > /dev/null
qiita:~$ cat /dev/null
qiita:~$ 

Recommended Posts

Black hole called / dev / null