magento web developer

Manchester based Magento and Zend Framework certified developer.

Installing XHProf on Magento

Installing XHProf on ubuntu is quite easy using the following commands:

sudo pecl install xhprof-beta

Add the following to the end of /etc/php5/conf.d/xhprof.ini (you will need to create it):


Navigate to the directory you just created

I’ve wanted to know if this was possible for ages, and I’ve only just found out it is!
You can navigate back to the directory you’ve just created (or even just referenced) with the following:

$ mkdir -p test/me
$ cd !$

Another useful tool is there also, mkdir -p creates a structure of directories, rather than creating one at a time.

Copy whilst preserving directory structure

$ cp --parents /a/directory/structure/file.txt /target/folder

This will copy file.txt from the folder you are in, and place it in the same folder structure, in the target folder.  The end result will look like this: