Sometimes you need to see updates to something in the terminal but the program that you’re running isn’t telling you what’s going on. One example of this is dd which unhelpfully shows you nothing until it has finished executing.
If, for example, I were running the dd command as follows:
dd if=/dev/diskx of=~/Desktop/output.iso
and I wanted to see how far the copy had prgressed, I could use a bash infinite loop with the ls command to constantly check the file size of the output file. If I knew the size of the input file then I’d be golden. Something like this would do the trick:
while : ; do ls -l ~/Desktop/output.iso ; sleep 1 ; clear ; done
This would give me a continually updating filesize of the output file. Once that file size stops increasing I’d just hit CTRL+C to break out of the loop.
CUPS – the Common Unix Printing System is a modular printing system for unix-like operating systems, and is built in to Mac OSX. You may want to disable it to free up resources if you are optimising your system, and you can do so in the following way from the command line:
Sometimes OSX audio gets its knickers in a twist and needs to be reset. One example of this is it you have a set of USB speakers plugged in and suddenly they are not picked up by the OS when previously they have been working fine. You can usually fix this issue with the following command from the terminal:
sudo killall coreaudiod
Of course a reboot would also work but this option just saves the hassle.