Tag Info

New answers tagged

1

Apparently it keys off of the width of your terminal. If you size the terminal just right you can get hexedit to show you 8 columns instead of 9. Example 00000000 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................................ 00000020 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ...


4

This is behavior specific to dd. From the dd man page: Sending a USR1 signal to a running 'dd' process makes it print I/O statistics to standard error and then resume copying. $ dd if=/dev/zero of=/dev/null& pid=$! $ kill -USR1 $pid; sleep 1; kill $pid 18335302+0 records in 18335302+0 records out 9387674624 bytes (9.4 GB) copied, 34.6279 ...


1

This command worked in the end, executed on my beaglebone as root: pkill -USR1 -n -x dd I could run the command over and over again and it would indeed update (slow transfer). Interestingly, the update would appear on the other Terminal window (i.e. the one executing the dd command): Debian GNU/Linux 7 BeagleBoard.org BeagleBone Debian Image 2014-04-23 ...


1

you can divide by zero. G=$(($((M=$((K=1024))*$K))*$K)) IF=./source_file SKIP=$((3*$M)) dd "if=$IF" "skip=$(($SKIP/($SKIP<$(wc -c <"$IF"))))" That either evaluates to "$SKIP/1" or "$SKIP/0". In truth, it isnt dd that returns false, but the shell - which does mean that dd is never even invoked, but wc is of course. It might also be worth running in a ...


0

To "add a little step, like an option or confirmation message", you can do what artm suggested in the comments to your question: use a wrapper script. In other words, rather than dealing directly with the somewhat daunting command line arguments of dd directly, create a script in bash (or Python, etc) that takes the dd arguments that you're interested in, ...


5

It's reasonable to ask why the dd command doesn't first check whether its target contains a mounted filesystem, and then prompt for confirmation or require a special flag. One simple answer is that it would break any scripts that expect to be able to use dd in this way, and that aren't designed to handle interactive input. For instance, it can be reasonable ...


9

I know dd is supposed to be a power user tool but still, it doesn't make sense to me that you can basically screw your whole computer by hitting the wrong key. Consider the kinds of power tools used in civil construction and what you can screw up by doing one little thing wrong. Could those things be made more preventable? Probably, but the counter ...


0

Although at first the proposed "challenge" may seem difficult, not feasible or sound naive as some have commented, it isn't. The main idea behind using dd to migrate from a bigger to a smaller disk is perfectly fine and have benefits for migrating the data. Of course, having enough free space so that the occupied data fits in the destination disk is a ...


0

If you want to fit a car in a passageway that's 20cm narrower than the car, and you cut the left 20cm of the car, will the car still work? Probably not. If you copy a the beginning of a disk to another disk and cut the copy short because the target disk is smaller, the result isn't going to work. Even if there would be enough space to fit all the files on ...


1

The physical drive should not start smoking, at least, but chances are very good that your filesystem will not work anymore (I mean, the target filesystem; if you just copied and did not touch anything in the source, the source itself should be fine). Data inside a partition is not necessarily allocated in increasing order. Some of it may be at the end of ...


1

Tested: INFILE=in seq 0 1000 $((`stat --format %s $INFILE` /100000 )) | parallel -k dd if=$INFILE bs=100000 skip={} conv=sparse seek={} count=1000 of=out You probably need to adjust 1000.


1

One custom, untested code sniplet coming up: dd if=oldf conv=sparse bs=1k count=3000000000 of=newf & dd if=oldf conv=sparse bs=1k skip=3000000000 count=3000000000 seek=3000000000 of=newf & dd if=oldf conv=sparse bs=1k skip=6000000000 count=3000000000 seek=6000000000 of=newf & dd if=oldf conv=sparse bs=1k ...


1

It is not needed if you want to copy a whole DVD to a file which shall afterwards contain only the payload of that DVD. Actually notrunc is a risk for privacy and can cause media overflow if you overwrite an old file that is larger than the DVD payload. In this case the surplus blocks of the old file will stay appended to the copied DVD content. So they ...


0

If I had to guess, based on this comment from the Wikipedia article on dd: The notrunc conversion option means do not truncate the output file — that is, if the output file already exists, just replace the specified bytes and leave the rest of the output file alone. the use of notrunc is for performance reasons. No sense in re-writing the entire file ...


1

Sometimes the copy succeeds and sometimes it fails. Probably it fail because some process in the while wrote to the mounted filesystem, guess that's why is a good practice to umount before :-) dd should really be just open and write, I guess the MacOSX version add some control and I think is easy to understand why with their device names, compared to ...


1

The slowdown is because of retries, you should be able to confirm that by looking in /var/log/syslog (or /var/log/messages). dd is fine for cloning working partitions but can take a long time on partitions on faulty disks. In your case I would use GNU ddrescue to clone the drive, it spends less time on unrecoverable retries and homes in from front to back ...


0

bs=4194304 is too low. You can try higher values, like bs=128M You did not mention how is the new drive connected, is it through USB 2.0. If it is, then unfortunately you cannot get better speed.



Top 50 recent answers are included