/dev/null,它是空设备,也称为位桶(bit bucket),外号叫无底洞。任何写入它的输出都会被抛弃。如果不想让消息以标准输出显示或写入文件,那么可以将消息重定向到位桶。


$ if=/dev/zero of=./test.txt bs=1k count=1
$ ls -l
total 4
-rw-r-r- 1 oracle dba 1024 Jul 15 16:56 test.txt

$ find / -name access_log 2>/dev/null


PR: 0

 分享到饭否 分享到做啥

No Comments

Be the first to comment on this entry.

Leave a comment

:-) :evil: ;-) :mrgreen: :lol: :-D ??? :shock: :roll: :cool:
Mail (will not be published)(required)

Fields in bold are required. Email addresses are never published or distributed.

Some HTML code is allowed:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>
URLs must be fully qualified (eg: http://www.ibeijie.cn),and all tags must be properly closed.

Line breaks and paragraphs are automatically converted.

Please keep comments relevant. Off-topic, offensive or inappropriate comments may be edited or removed.

E-mail It