linux 使用dd命令清空文件
linux 使用dd命令清空文件
[oracle@Oracle11g ~]$ dd if=/dev/zero of=tempfile bs=1024 count=2
2+0 records in
2+0 records out
2048 bytes (2.0 kB) copied, 5.382e-05 seconds, 38.1 MB/s
[oracle@Oracle11g ~]$ ls -l tempfile
-rw-r--r-- 1 oracle oinstall 2048 11-27 22:29 tempfile
[oracle@Oracle11g ~]$ dd if=/dev/zero of=tempfile bs=1024 count=0
0+0 records in
0+0 records out 0 bytes (0 B) copied, 8.789e-06 seconds, 0.0 kB/s
[oracle@Oracle11g ~]$ ls -l tempfile -rw-r--r-- 1 oracle oinstall 0 11-27 22:30 tempfile
注意:/dev/zero 是一个空 设备
创建时间:2021-09-17 10:48
넶浏览量:0