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 execute multiple php files via command line?

share|improve this question
up vote 1 down vote accepted

Just call them one after each other:

a.php; b.php; c.php
share|improve this answer
Just a quick note: With ;, all subsequent commands will execute when one failed. with "&&", further commands will only execute when the previous finished without error. – fab Apr 29 '11 at 15:18

Or if you don't want to type out all the names:

ls *.php | xargs -tn1 php

This being Unix, there are many (many) other ways to do this too.

share|improve this answer
Your name is pretty slick, but I might have added "Some Totally Random Guy". – Xeoncross Apr 29 '11 at 15:25

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.