Coreutils 8.24 added status=progress
first line is the speed the uncompressed data is read, second line is the compressed data sent over ssh. change sdb to your target drive/partition to be backed up. change pbzip -c1 to suit your compression. and ssh to your target file. don't forget to run zerofree/fstrim first! Show Sample Output
Sets the size of the disk to $DISKSIZE so that the percentage readout of pv is correct. set /dev/sdb to whatever your disk is /dev/sdX. Next pipe dd to pv, then pipe pv to gzip so that you get a gzipped image file. Show Sample Output
Gives a nice progress bar while writing an iso file to usb to create a mountable usb drive. file.iso represents the iso file /dev/sdX represents the usb to write to Show Sample Output
Piping dd through pv allows to control the size ot the output file and allows for feedback on speed and progress. Sample output is 128 bytes as seen with xxd. See also: http://www.red-bean.com/onetime/#pad-generation Show Sample Output
uses the wonderful 'pv' command to give a progress bar when copying one partition to another. Amazing for long running dd commands Show Sample Output
create iso from partition
Recovery patition from iso
Recent versions of dd provides status flag. Setting that flag to progress shows progress in realtime.
Available since GNU Coreutils 8.24 (2015-07) Show Sample Output
usb must be bootable with rufus or other
This is a bit of a bash hack to catch STDERR and append a log level to it. So for example, if your script has pseudo loglevels like so: echo "INFO - finding files" [ -f ${files} ] || echo "WARN - no files found" Any subcommands that write to STDERR will screw that up Adding 2> >(fb=$(dd bs=1 count=1 2>/dev/null | od -t o1 -A n); [ "$fb" ] && err=$(printf "\\${fb# }"; cat) && echo "ERROR - $err") to the command does the following: 2> Redirect STDERR >( Spawn a subshell (STDERR is then redirected to the file descriptor for this subshell) fb=$(....) get the first byte of input [ "$fb" ] test if there's a first byte && err=$(printf....) save the output to the $err variable && echo "ERROR - $err" append your pseudo loglevel and the error message Heavily borrowed from https://unix.stackexchange.com/questions/33049/check-if-pipe-is-empty-and-run-a-command-on-the-data-if-it-isnt Show Sample Output
Does the same but shows nicely progress in real time with correct Size in %. But also needs the packages sudo,dd,pv and dialog.
dd for windows is available from http://www.chrysocome.net/dd Tested with CD-ROMs like Linux install discs I don't know about DVD-ROMs.
Test your XFS filesystem and Raptor hard drives for write performance.
This is a bit to bit copy so if you have a 500GB hard disk it will take a long time even if have Gigabit Ethernet
Similar.
Have you ever wondered what the hell was dd command doing? well, there you have it... notice the -USR1 signal :)... Show Sample Output
It will produce passwords with length of 20 printable characters within a reasonable time. For shorter or longer passwords just change the 20 in bs=20 to something more convenient. To create only alpha numeric passwords change [:print:] to [:alnum:] Show Sample Output
commandlinefu.com is the place to record those command-line gems that you return to again and again. That way others can gain from your CLI wisdom and you from theirs too. All commands can be commented on, discussed and voted up or down.
Every new command is wrapped in a tweet and posted to Twitter. Following the stream is a great way of staying abreast of the latest commands. For the more discerning, there are Twitter accounts for commands that get a minimum of 3 and 10 votes - that way only the great commands get tweeted.
» http://twitter.com/commandlinefu
» http://twitter.com/commandlinefu3
» http://twitter.com/commandlinefu10
Use your favourite RSS aggregator to stay in touch with the latest commands. There are feeds mirroring the 3 Twitter streams as well as for virtually every other subset (users, tags, functions,…):
Subscribe to the feed for: