Tagged Questions
3
votes
2answers
156 views
How to write file into another
I have an empty file (only zeroes are in it) of size 9,0KB and I need to write another file (with size 1,1KB) to it, but the first file must not lose its size or the rest of its contents. So if the ...
15
votes
3answers
454 views
How can you trim files using the command line?
What is the console equivalent of the following Python code:
target = file("disk", "w") # create a file
target.seek(2*1024*1024*1024) # skip to 2 GB
target.write("\0")
target.close()
Maybe some ...
5
votes
2answers
732 views
Unpack files and directories from an image created by dd?
I created an image of an NTFS partition using dd.
I wonder if I can unload/unpack the files and directories in the image to any partition whose size is larger than the image size, so that I can ...
5
votes
1answer
598 views
Are there alternatives for `dd`?
What other tools should I use to read and write files with truncation, seeking and skipping. dd's command line options seem inconvenient and foreign and I don't like choosing between slow, but precise ...
0
votes
2answers
936 views
How to write a file at various offsets to a filesystem partition with dd command
Requirement
I want to write a file at various offsets into the partition
Partition /dev/part2 is mounted at /mypart
I tried the command below:
dd if=/dev/urandom of=/mypart/aaa bs=1024 seek=0 ...