# Ubuntu - Execute multiple php files via command line

How do I execute multiple php files via command line?

Just call them one after each other:

a.php; b.php; c.php

• 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.

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