-
-
Save bfgits/0e1bcf20afe7005d4c58d04409bd5df2 to your computer and use it in GitHub Desktop.
linux dd command create a large file
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
dd if=/dev/zero of=/tmp/test bs=1M count=2048 | |
dd | |
使用dd这个linux命令可以创建一定大小文件。 | |
linux创建文件命令:dd命令 | |
把指定的输入文件拷贝到指定的输出文件中,并且在拷贝的过程中可以进行格式转换。语法: | |
CODE:[Copy to clipboard]dd 〔选项〕 | |
QUOTE: | |
if =输入文件(或设备名称)。 | |
of =输出文件(或设备名称)。 | |
ibs = bytes 一次读取bytes字节,即读入缓冲区的字节数。 | |
skip = blocks 跳过读入缓冲区开头的ibs*blocks块。 | |
obs = bytes 一次写入bytes字节,即写 入缓冲区的字节数。 | |
bs = bytes 同时设置读/写缓冲区的字节数(等于设置obs和obs)。 | |
cbs = bytes 一次转换bytes字节。 | |
count = blocks 只拷贝输入的blocks块。 | |
conv = ASCII 把EBCDIC码转换为ASCII码。 | |
conv = ebcdic 把ASCII码转换为EBCDIC码。 | |
conv = ibm 把ASCII码转换为alternate EBCDIC码。 | |
conv = blick 把变动位转换成固定字符。 | |
conv = ublock 把固定们转换成变动位 | |
conv = ucase 把字母由小写变为大写。 | |
conv = lcase 把字母由大写变为小写。 | |
conv = notrunc 不截短输出文件。 | |
conv = swab 交换每一对输入字节。 | |
conv = noerror 出错时不停止处理。 | |
conv = sync 把每个输入记录的大小都调到ibs的大小(用ibs填充)。 | |
fdformat命令 | |
低级格式化软盘。 | |
实例: | |
创建一个100M的空文件 | |
dd if=/dev/zero of=hello.txt bs=100M count=1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment