/dev/zero是什么意思

来源:学生作业帮助网 编辑:作业帮 时间:2024/11/27 07:40:53
/dev/zero是什么意思
xS]OA+7l[%`P ;ٙ( `@ GV-O&7{=;){(SY6E~/&ߓ {(Znt{4-UYy>wsŚ6ë[뻝G^meeh_sm lU?.w:y:Q^0ons-" X=bOlmx;W#*1 SdYRAxx&@zBQt5`BE)!n* !4Lǝx كAv@;E60gh^ +sg!qN, $R>2Eiiɦ{Vh٭Vݓ\ի}q/㊿5gF8s67$aS( KRQKjcbHf1t D)`^@*d +H<

/dev/zero是什么意思
/dev/zero是什么意思

/dev/zero是什么意思
/dev/zero,是一个输入设备,你可你用它来初始化文件.
/dev/zero------该设备无穷尽地提供0,可以使用任何你需要的数目——设备提供的要多的多.他可以用于向设备或文件写入字符串0.
oracle@localhost oracle]$if=/dev/zero of=./test.txt bs=1k count=1
oracle@localhost oracle]$ ls -ltotal 4
-rw-r--r-- 1 oracle dba 1024 Jul 15 16:56 test.txteg,
find / -name access_log 2>/dev/null
这样,一些诸如一些错误信息就不会显示出来.
/dev/zero:
In Unix-like operating systems,/dev/zero is a special file that provides as many null characters (ASCII NULL,0x00; not ASCII character "digit zero","0",0x30) as are read from it.One of the typical uses is to provide a character stream for overwriting information.Another might be to generate a clean file of a certain size.Using mmap to map /dev/zero to RAM is the BSD way of implementing shared memory.