LoginSignup
0
0

More than 3 years have passed since last update.

/dev/nullというブラックホール

Last updated at Posted at 2019-12-07

この記事はtut Advent calendar2019の記事 にしましたです。

あらゆる出力のブラックホール

linuxには/dev/nullというブラックホールのようなファイルが存在しています。コマンドの出力リダイレクト先として指定すると、そこに出力されたデータは消えてなくなります。
また、入力リダイレクトとして使用すれば、何も帰ってくることはありません。

恐るべし。

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

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0