Answer the question
In order to leave comments, you need to log in
DD - Is it possible to write zeros to a partition starting at a certain offset?
Is it possible to fill a partition with zeros using dd in linux, starting from 250 gigabytes. The disc itself is 500.
Answer the question
In order to leave comments, you need to log in
# man dd
...
seek=n Seek n blocks from the beginning of the output before copying.
On non-tape devices, an lseek(2) operation is used. Otherwise,
existing blocks are read and the data discarded. If the user
does not have read permission for the tape, it is positioned
using the tape ioctl(2) function calls. If the seek operation
is past the end of file, space from the current end of file to
the specified offset is filled with blocks of NUL bytes.
...
You need to:
1. Use the /dev/zerooos/ device - I deliberately wrote it with an error so as not to discourage the study of the system, but there is still a hint!
2. You need the dd parameter that specifies the block size
3. You need the dd parameter that specifies the output device
4. You need the dd parameter that specifies the seek position in the output device, expressed in size, taking into account point 2
Hmm. It's easier for someone to write a question and wait for an answer on the Toaster than to read man dd
*facepalm*
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question