Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

How do I make sure I get notified when the job is done?

Here is what I'm running:

$ time find -exec chmod o-r '{}' \+&

I would like to know how long the job took and be notified when it is done.

I thought of doing this:

$ time ls -l 2>&1 | write buttlebutkus pts/0&

(Using ls -l to do a quick test)

But the result was kind of weird. Though it did seem to essentially work, but I'm afraid maybe only because the ls sent an EOF to the write.


I just tried this:

$ time find -exec chmod o-r '{}' \+ 2>&1 | write buttlebutkus pts/0&

Now I am seeing millions of pages of output and cannot get away from it with either ctrl-z or ctrl-c.

share|improve this question
up vote 2 down vote accepted
$ time find -exec chmod o-r '{}' \+ 2>&1 && write buttlebutkus pts/0 &

man bash

   The control operators && and ││ denote AND lists and OR lists, respectively.  An AND list has the form

          command1 && command2

   command2 is executed if, and only if, command1 returns an exit status of zero.
share|improve this answer
Brilliant! I was going to ask you why &&. Thank you for adding the quote from man bash. I would have never thought of using that operator. Perfect! – Buttle Butkus Sep 26 '12 at 5:12
By the way, am I interpreting the 2>&1 correctly? Do I even need that for this to work? If you have any link that helps explain that syntax I would appreciate that too. – Buttle Butkus Sep 26 '12 at 5:14
2>&1 means that redirect stderr to stdout, and display both on the terminal. – quanta Sep 26 '12 at 5:21

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.