1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90
| $ dd if=/dev/zero of=bigfile bs=1M count=1000 1000+0 records in 1000+0 records out 1048576000 bytes (1.0 GB) copied, 3.38315 s, 310 MB/s
$ dd if=/dev/zero of=file bs=1M count=1000 conv=fdatasync 1000+0 records in 1000+0 records out 1048576000 bytes (1.0 GB) copied, 1.61011 s, 651 MB/s
$ dd if=/dev/zero of=file bs=1M count=1000 conv=fdatasync 1000+0 records in 1000+0 records out 1048576000 bytes (1.0 GB) copied, 0.733227 s, 1.4 GB/s
$ dd if=/dev/zero of=/dev/null& pid=$! [1] 15131 $ kill -USR1 $pid; sleep 1; kill $pid 6948825+0 records in 6948824+0 records out 3557797888 bytes (3.6 GB) copied, 8.28411 s, 429 MB/s [1]+ Terminated dd if=/dev/zero of=/dev/null
$ dd if=a.sh of=ab conv=ucase,excl
$ dd if=/dev/urandom of=/dev/sdb1
$ dd if=/dev/sda of=mbr bs=512 count=1
$ dd if=mbr of=/dev/sda $ file mbr mbr: x86 boot sector; partition 1: ID=0x83, active, starthead 32, startsector 2048, 2097152 sectors; partition 2: ID=0x8e, starthead 170, startsector 2099200, 39843840 sectors, code offset 0x63 $ fdisk -l /dev/sda Disk /dev/sda: 21.5 GB, 21474836480 bytes, 41943040 sectors Units = sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disk label type: dos Disk identifier: 0x000ac371 Device Boot Start End Blocks Id System /dev/sda1 * 2048 2099199 1048576 83 Linux /dev/sda2 2099200 41943039 19921920 8e Linux LVM $ hexdump mbr 0000000 63eb 1090 d08e 00bc b8b0 0000 d88e c08e 0000010 befb 7c00 00bf b906 0200 a4f3 21ea 0006 ... 0000180 6547 6d6f 4800 7261 2064 6944 6b73 5200 0000190 6165 0064 4520 7272 726f 0a0d bb00 0001 00001a0 0eb4 10cd 3cac 7500 c3f4 0000 0000 0000 00001b0 0000 0000 0000 0000 c371 000a 0000 2080 00001c0 0021 aa83 8228 0800 0000 0000 0020 aa00 00001d0 8229 fe8e ffff 0800 0020 f800 025f 0000 00001e0 0000 0000 0000 0000 0000 0000 0000 0000 00001f0 0000 0000 0000 0000 0000 0000 0000 aa55 0000200
$ dd if=/dev/sda of=/dev/sdb
$ dd if=/dev/sda1 of=boot
$ dd if=/dev/sda1 | gzip > boot.gz $ du -sh boot* 1.0G boot 128M boot.gz
$ gzip -dc boot.gz | dd of=/dev/sdb1
$ dd if=/dev/zero of=/swapfile bs=1M count=1024 $ mkswap /swapfile Setting up swapspace version 1, size = 1048572 KiB no label, UUID=8b967ebc-a025-47d4-bdc5-d2609231feec $ swapon /swapfile swapon: /swapfile: insecure permissions 0644, 0600 suggested. $ free -m total used free shared buff/cache available Mem: 3931 537 153 19 3240 3123 Swap: 3071 0 3071 $ echo "/swapfile swap swap defaults 0 0" >> /etc/fstab
$ swapoff /swapfile $ free -m total used free shared buff/cache available Mem: 3931 529 161 19 3240 3132 Swap: 2047 0 2047
|