Linux 標準出力のリダイレクト

/ Linux/Unix / Comment[0]
Trueの出力をリダイレクト
$ ping -c 4 google.com 1> /dev/null
$ ping -c 4 google.com > /dev/null

Falseの出力をリダイレクト
$ ping -c 4 hogehogeblahblah.com 2> /dev/null

True,False両方リダイレクト(コンソールに何も表示しない)
$ ping -c 4 kernel.org 2> /dev/null >&1

TrueとFalseの出力ファイルを分ける
$ ping -c 4 google.com 1> succcess.log 2> error.log
関連記事

コメント

:
:
:
:
:
管理人のみ表示を許可