bashoneliners.com

Welcome to bashoneliners.com, a curated collection of practical and well-explained Bash one-liners, snippets, tips and tricks. We aim to make each published one-liner to be of high quality: useful, easy to read, follows best practices, with clear, detailed, accurate explanation. These one-liners should help you automate tasks, troubleshoot problems, whether it be in system administration, file management, networking or programming.

Show dd status every so often

watch --interval 5 killall -USR1 dd

December 6, 2012FoxWilson

Faster disk imaging with dd

dd if=/dev/sda bs=$(hdparm -i /dev/sda | grep BuffSize | cut -d ' ' -f 3 | tr [:lower:] [:upper:] | tr -d BUFFSIZE=,) conv=noerror | dd of=image.dd conv=noerror

May 19, 2012austindcc

Test your hard drive speed

time (dd if=/dev/zero of=zerofile bs=1M count=500;sync);rm zerofile

February 1, 2012DAVEB