Results 1 to 9 of 9
Hii
This is deepti.
Please can anyone explain this command
find . -name \*.php -exec php -l '{}' \;
This is used to display PHP error notices in php scripts.
...
- 03-24-2009 #1Just Joined!
- Join Date
- Mar 2009
- Location
- Hyderabad
- Posts
- 10
Linux Command - find
Hii
This is deepti.
Please can anyone explain this command
find . -name \*.php -exec php -l '{}' \;
This is used to display PHP error notices in php scripts.
Thanks.
- 03-24-2009 #2
Hi and Welcome !
find . -name \*.php : Search files having .php extention.
-exec php -l '{}' \; : this part do the syntax check on php files.
Check here for option you can use with php.It is amazing what you can accomplish if you do not care who gets the credit.
New Users: Read This First
- 03-24-2009 #3Just Joined!
- Join Date
- Mar 2009
- Location
- Hyderabad
- Posts
- 10
Thank You for Quick Response.
I have one more doubt.
When I execute the above command in command prompt I got notices in php scripts. As I have many php scripts in the folder I have received 500+ notices but I am not able to see all the notices. can you pls say how to check/scroll all the notices. Thanks.
- 03-24-2009 #4
Direct output of find command to a file.
Code:find . -name \*.php -exec php -l '{}' \; > error_list less error_listIt is amazing what you can accomplish if you do not care who gets the credit.
New Users: Read This First
- 03-25-2009 #5Just Joined!
- Join Date
- Mar 2009
- Location
- Hyderabad
- Posts
- 10
I did not get the above statement. Can you please explain it clearly.
Actually my local system having windows operating system and I am connecting to linux server using putty. Here I need to execute this command(find) in this editor after getting connection from the server.
Is there any option to check 20 messages(per enter) by using -n 20................
- 03-25-2009 #6
That command will store output of find in error_list file and you can check contents of error_list file using less command.
Have you tried to execute both commands one by one?It is amazing what you can accomplish if you do not care who gets the credit.
New Users: Read This First
- 03-25-2009 #7Just Joined!
- Join Date
- Mar 2009
- Location
- Hyderabad
- Posts
- 10
Yes, I have executed these commands. Thanks a bunch......

If we use find . -name \*.php -exec php -l '{}' \; >> error_list... Will the error notices appends to this file(error_list)...?
- 03-25-2009 #8Yes. >> appends file.If we use find . -name \*.php -exec php -l '{}' \; >> error_list... Will the error notices appends to this file(error_list)...?It is amazing what you can accomplish if you do not care who gets the credit.
New Users: Read This First
- 03-26-2009 #9Just Joined!
- Join Date
- Mar 2009
- Location
- Hyderabad
- Posts
- 10
Thank You..


Reply With Quote
