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

I have a script which copies(scp) .war file to tomcat's webapps and the .war file extracts creating a folder under webapps directory on a ubuntu system. My next line of the script is restarting the tomcat which is executed immediately before the .war is extracted and this causing problem with

Is it possible so that it waits for few seconds/minutes before it executes the next line of the script. The script is of normal ubuntu commands.

share|improve this question
up vote 5 down vote accepted

sleep <seconds>

share|improve this answer

Use sleep 60 for 1 min.

share|improve this answer

Command sleep allows you to insert breaks to your scripts. For example, sleep 10 would wait 10 seconds before proceeding.

share|improve this answer

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.