Sometimes when running long running tasks (like a copy, move, or even a benchmark on a system) I want to know when the task is complete, so I can kick off the next task or see the results. Turns out there’s two simple commands (well, one command and one special char to be exact) to notify the user using the system bell:

tput bel

or

echo -e "a"

So you could have a long running script (put this in a something.sh bash script and execute), like:

tar -czvf mybigtarfile bigdirectory
tput bel

Or you can do it right on the command line with the “;” to separate the tasks, such as:

$ mv bigfile /storage; tput bel 

On a mac the terminal icon will do the bounce up and down dance to get your attention.

In Windows if you’re using something like Putty, you need to set the default behavior to have the task bar flash. You then have to save this to the “Default Session” in the Saved Sessions Window.
2013-09-17_11-15-58

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.