installing the development version of the sphinx documentation tool

Get the latest version from bitbucket:

$ hg clone http://bitbucket.org/birkenfeld/sphinx

The remainder of the instructions are based on the README, but details will vary according to what package dependencies need to be met. That is, some additional packages beyond what is described here may need to be installed.
Change to the new directory, build, and install.

cd sphinx
python setup.py build
sudo python setup.py install

Build sphinx’s documentation with sphinx:

cd doc
sphinx-build . _build/html

And, that should do it.

Also see the bitbucket sphinx wiki .

installing ntop on Ubuntu : problem with rrd directories

The ubuntu install for ntop is broken without some additional steps.

‘Ubuntu Bloke’ had the easy fix :

"Create the directories that for some reason are not created by the installer
sudo mkdir /var/lib/ntop/rrd
sudo mkdir /var/lib/ntop/rrd/graphics
sudo mkdir /var/lib/ntop/rrd/flows
sudo mkdir /var/lib/ntop/rrd/interfaces
sudo mkdir /var/lib/ntop/rrd/interfaces/eth0
sudo mkdir /var/lib/ntop/rrd/interfaces/ppp0
sudo chmod -R 775 /var/lib/ntop"

converting a pdf into html (one file to many method)

Here’s an Ubuntu (and other linux/Unix?) tip taken from ehow .

To convert a pdf into navigable html (with images intact), you can use pdftohtml:

E.g.,

 pdftohtml -c originalfile.pdf  newname_template.html

Converting a book-length pdf using this method gave me a directory full of files, with consecutively numbered html files representing the pages.   Names were based on the ‘newname_template’ supplied, as were the png image files.  Not the prettiest, but functional, and viewable on devices lacking native pdf-rendering capabilities.

linux/Unix tools for multiline grep

grep -A 2 SearchString # find and return SearchString and the two lines after the line that matches
grep -B 3 SearchString # find and return SearchString and the three lines before the line that matches

also,
pcregrep
pcregrep -M ‘a\nb’ files…

Is there a difference between “apt-get purge” vs. “apt-get remove –purge” ?

I was wondering this myself, as the two seemed to do the same thing. Google helpfully turned up a thread from ubuntu-users (Jan. ’09).

This post sums it up well (and accurately, I believe):

>Derek B. writes:
>>Tommy T. wrote:
>>> On Fri, Jan 23 [...] Pierre F. wrote:

>>> hi,
>>> Is there any subtle difference between the 2 syntaxes?
>>> (I couldn’t find the answer in any documentation)

>>
>> Don’t they do different things?
>
>No.