Created
March 16, 2017 12:45
-
-
Save byteshiva/ebedab43b709c8bddfed16b4454a14b0 to your computer and use it in GitHub Desktop.
copy large files using dd command
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=CREATE_TEST_FILE bs=1k count=4700000 |
- Converting case of a file.
a. Converting a file to uppercase.
dd if=file1 of=file2 conv=ucase
b. Converting a file to lowercase.
dd if=file1 of=file2 conv=lcase
- Creating or modifying data files.
a. Create a fixed size, say 10MB file.
dd if=/dev/zero of=file1 bs=10485760 count=1
The block size is calculated as 10MB=1010241024.
b. Modify the first 512 bytes of a file with null data.
dd if=/dev/zero of=file1 bs=512 count=1 conv=notrunc
The option ‘notrunc’ refers to do not truncate the file, only replace the first 512 bytes, if it exists. Otherwise, you will get a 512 byte file.
parallel faster data transmission form machine 1 to machine 2
bbcp -P 2 -w 2M -s 10 my.big.file dest@dest-ip-addr:/tmp/
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
a. Convert the data format of a file from ASCII to EBCDIC.
b. Convert the data format of a file from EBCDIC to ASCII