views:

98

answers:

6

Hello. Every one.

Actually I would like to know the list of commands & there use, which can be helpful for php development.

Say for example,

Crop Command => May be used to crop an image, Cut image

I know very few commands of linux like "ls", "pwd" just the basic ones.

I am not much interested to learn all linux programs. But The commands which can be helpful for php website development.

( Say for example, php developer can execute some commands on server side. )

Thanks in advance.

Sagar.

(Please inform me by comment, if it's a duplicate of need more Clarifications )

+1  A: 

grep is a wonderful tool for searching text files of all kinds. All developers should at least know about it.

Knowing your way around the kill command can also be useful if your processes go crazy because of a bug.

Ben S
+1  A: 
mogrify -resize (width)x(height)

although you can do it easily via GD2 library (usually built-in PHP)

dusoft
+1  A: 
devguy%>man linux  
"Ambiguous command  "

torvolds%>man linux  
"That's funny Linus, you da' man."
Kelly French
+1  A: 

Realtime error log analysis:

tail -f /var/log/apache2/error.log

See how this works: http://stackoverflow.com/questions/1709020/setting-custom-error-handler-dramatically-increases-script-execution-time/1709151#1709151

powtac
+1  A: 

The only ones that will really help you are tail, vim, cat, etc for reading logs if necessary.

Otherwise, you should avoid using OS specific tools for php wherever feasible. What happens if someone needs to edit or work on a part from Windows using IIS or XAMP? Then the tools will fail. An IDE that is cross platform is nice too.

Now, one of the keys here that you mention is crop. This can easily be done using php, and you can then re-use and keep it in your php toolset. A quick search for crop and php will give you a ton of scripts to do this, and if you wanted to do an entire directory, you can create a loop to do that.

So, to only sort of answer your question, try to use php's tools wherever possible, as it will allow for cross-platform work, and will allow you re-use the tool without having to make sure the program is installed on the new server, etc.

Cryophallion