dd bs=1024 count=1440 if=/dev/zero of=myfd
will make a virtual floppy disk of size 1.44MB with name “myfd”. “dd” is a command to write data into disk. “bs” is block-size. bs=1024 means 1 block is 1024 byte (this "block" is not the file system block, it is just the unit of data transfer in "dd" command). “count” is the number of blocks to write. count=1440 means write 1440 blocks, which is 1440*1024=1440KB=1.44 MB. “if” is input file to read data from. /dev/zero is a special file that gives out zeros when being read. “of” is the output file. Note bs is NOT file system block size. You can make same disk with bs=1 as below:
dd bs=1 count=1474560 if=/dev/zero of=myfd
dd
명령어는 리눅스에서 데이터를 디스크에 쓰기 위해 사용되는 명령어bs
는 블록 크기를 의미함. 이 "블록"은 파일 시스템 블록이 아니라 "dd" 명령어에서의 데이터 전송 단위임.count
는 쓸 블록의 수를 나타냄. count=1440
은 1440개의 블록을 쓴다는 것을 의미함.if
는 데이터를 읽을 입력 파일of
는 데이터를 작성할 출력 파일# xxd myfd > x
# vi x
/400
xxd myfd > x