Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free.

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

I want to do such as following:

pause 30 seconds

This is only example script with pause of 30 seconds between run of 2 command.

How to do this?

share|improve this question
up vote 11 down vote accepted

You can use this in a terminal:

command1 && sleep 30 && command2 && exit

In(case as)your script:

sleep 30

Suffix for the sleep time:

  • s for seconds (the default)
  • m for minutes
  • h for hours
  • d for days
share|improve this answer
No need for the && in this script. – Louis Matthijssen May 15 '14 at 13:58
Thanks for hint it's corrected – TuKsn May 15 '14 at 14:02

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.