Marcin
Marcin

Reputation: 5579

Equivalent of ps -A | grep -c process in Windows?

I am looking for an equivalent/alternative of Linux's ps -A | grep -c script.php for Microsoft Windows?

Upvotes: 26

Views: 47071

Answers (2)

Alex Nolasco
Alex Nolasco

Reputation: 19456

An alternative solution to the accepted answer

tasklist /fi "Imagename eq script*"

In case you need this in a loop

for /l %x in (1, 0, 2) do (timeout /t 2 | tasklist /fi "Imagename eq script*")

Source: https://technet.microsoft.com/en-us/library/bb491010.aspx

Upvotes: 11

Dmitry Reznik
Dmitry Reznik

Reputation: 6862

Simple commands:

tasklist | FIND "script.php"

Upvotes: 43

Related Questions