Last Updated: September 09, 2019
·
673
· pierrel

Stop staring at long-running commands

Sometimes you exec some long-running command in the shell and don't want to stare at it until it's done. Maybe you want to browser twitter instead? Try this:

echo -e "\a"

This command rings the internal bell sound on most shells and lets you know when the previous command is done. For example:

grep -r "some_string" /some/huge/dir ; echo -e "\a"

If you're on a Mac and the command completes while the terminal is in the background you'll also get a little badge and a jumping doc icon.

2 Responses
Add your response

Under Mac OS X you can also run "tput bel"

over 1 year ago ·

I considered using that but after looking at the man page for tput it didn't make much sense and echo is just more familiar to people. Absolutely works though.

over 1 year ago ·