Tag Info

New answers tagged


diskutil list will show you the Drives. A Partition is /dev/diskXsY. So dd if=/dev/diskXsY of=/BACKUPIMAGE.img with the appropriate X and Y should do it for you.


The following solution is based on nothing but xxd (one of the tools mentioned in the question), Bash and GNU sed. It assumes that the input consists of complete bytes (groups of eight letters), arbitrarily separated by newlines. The approach is: Strip all newlines. Group letters into four-letter groups terminated by spaces. Filter these quadgraphs into ...


Another perl: perl -pe 'BEGIN { binmode \*STDOUT } chomp; tr/AB/\0\1/; $_ = pack "B*", $_' Proof: $ echo ABBBAAAABBBBBABBABBBABBB | \ perl -pe 'BEGIN { binmode \*STDOUT } chomp; tr/AB/\0\1/; $_ = pack "B*", $_' | \ od -tx1 0000000 70 fb 77 0000003 The above reads input one line at a time. It's up to you to make sure the lines are exactly what ...


Perl: my $len = 24; my $str = "ABBBAAAABBBBBABBABBBABBB\n"; $str =~ s/\s//g; (my $bin = $str) =~ y/AB/01/; my $val = oct("0b".$bin); printf "%s -> %s -> %X\n", $str, $bin, $val; my ($filename, $fh) = ("temp.out"); # write the file open $fh, '>', $filename; print $fh pack("N", $val); # this actually writes 4 bytes close $fh; # now read it, ...


{ printf '2i[q]sq[?z0=qPl?x]s?l?x' tr -dc AB | tr AB 01 | fold -b24 } <infile | dc In making the following statement, @lcd047 has pretty well nailed my earlier state of confusion: You seem to be confused by the output of od. Use od -tx1 to look at bytes. od -x reads words, and on little endian machines that swaps bytes. I didn't follow ...


this is actually not really the answer to your question, but i would recommend you to use https://github.com/Linutronix/elbe to build an Debian-based file-system for your r-pi.


Unless you specify oflag=direct or conv=fsync, then the kernel buffers the data and so dd thinks it is done as soon as the kernel has accepted the last of the data, which may be a few seconds before it makes it to the drive. For small amounts of data, that can introduce significant error to the throughput estimate.


In general dd displays the time it took for the entire transfer and the speed is "amount of data divided by time it took". Basically it's the same you should get with time dd ..., no magic there. 40603811328 bytes (41 GB) copied, 459.645 s, 88.3 MB/s 40603811328 / 459.645 / 1000 / 1000 = 88.3373 Maybe you cancelled the dd at some point and restarted it, ...


MTPFS is a filesystem, not a partition. Your computer makes requests like “give me the file at this location”, not “give me the content of this block”. How the files are stored on the other side is not visible through MTP; it could be a gnome typing replies very very fast. If you want to make a backup of what you can see over MTP, just back up the files. ...

Top 50 recent answers are included