Acquires a bit-by-bit data image, gzip-compresses it on multiple cores (pigz) and encrypts the data for multiple recipients (gpg -e -r). It finally sends it off to a remote machine.
Uses the pv utility to show progress of data transfer and an ETA until completion. You can install pv via Homebrew on macOS Show Sample Output
mount with: mount -t msdos -o loop ./floppy.img /tmp/mnt
Replace (as opposed to insert) hex opcodes, data, breakpoints, etc. without opening a hex editor. HEXBYTES contains the hex you want to inject in ascii form (e.g. 31c0) OFFSET is the hex offset (e.g. 49cf) into the binary FILE
Depending on the speed of you system, amount of RAM, and amount of free disk space, you can find out practically how fast your disks really are. When it completes, take the number of MB copied, and divide by the line showing the "real" number of seconds. In the sample output, the cached value shows a write speed of 178MB/s, which is unrealistic, while the calculated value using the output and the number of seconds shows it to be more like 35MB/s, which is feasible. Show Sample Output
Same as above but slooooow it down
Overwrites the boot sector. Since this doesn't overwrite any data, you can usually recover by re-creating the partition table exactly the same as before you zeroed it. This can also help sometimes if you install a new drive in a Windows machine which can't read it.
bs = buffer size (basically defined the size of a "unit" used by count and skip) count = the number of buffers to copy (16m * 32 = 1/2 gig) skip = (32 * 2) we are grabbing piece 3...which means 2 have already been written so skip (2 * count) i will edit this later if i can to make this all more understandable
If you're trying to create a sparse file, you can use dd by 'skip'ing to the last block instance. ls -ls shows the actual size vs. the reported size Show Sample Output
An alternative which does not require to be root
Only slightly different than previous commands. The benefit is that your "watch" should die when the dd command has completed. (Of course this would depend on /proc being available)
Useful when you want to know the mbrid of a device - for the purpose of making it bootable. Certain hybridiso distros, for eg the OpenSUSE live ISO uses the mbrid to find the live media. Use this command to find out the mbrid of your USB drive and then edit the /grub/mbrid file to match it. Show Sample Output
Especially useful to gauge the performance of a VPS. Show Sample Output
This is a useful command to backup an sd card with relative total size for piping to pv with a progressbar
SIZE is the number of gigabytes and the file name is at the end. Random data is generated by encrypting /dev/zero, similar to other techniques posted on here.
need package: pv apt-get install pv get the iso size in byte with ls -l install-cd.iso /dev/sdb is your USB Device (without partitionNr.)
Creates a quick backup with tar to a remote host over ssh.
Test your XFS filesystem and Raptor hard drives for write performance.
This will create a 10 MB file named testfile.txt. Change the count parameter to change the size of the file. As one commenter pointed out, yes /dev/random can be used, but the content doesn't matter if you just need a file of a specific size for testing purposes, which is why I used /dev/zero. The file size is what matters, not the content. It's 10 MB either way. "Random" just referred to "any file - content not specific" Show Sample Output
Intentional hash in the beginning. May run a looong time. Wipes your data for real. Was meant to be /dev/urandom - I mistyped it. :-)
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: