dcfldd do trunc files when conv=notrunc

553 views Asked by At

I want to work with dcfldd becouse it is faster and modern disks are bigger.

dcfldd trunc file even if the option conv=notrunc is set. I work on CentOs5.x. Also, I tryed to compile the program from source but it gives the same results, dcfldd corrupts the file.

examples:

echo -n 123456789 >outfile

echo -n "X" | dd of=outfile conv=notrunc

cat outfile will give:

X23456789

echo -n "Y" | dcfldd of=outfile conv=notrunc

cat outfile will give:

Y

Should I change something in the source or am I doing something wrong?

1

There are 1 answers

0
Matthew Wong On BEST ANSWER

From my experience, of is only affected by seek and conv options that appear before them. So your example:

echo -n 123456789 >outfile
echo -n "Y" | dcfldd conv=notrunc of=outfile

will work as intended. The behavior may be modified to accommodate dcfldd's ability to deal with multiple of options.