Quantcast
Channel: GLOG » freedom shoppe
Viewing all articles
Browse latest Browse all 3

Greg K-H’s Little Kernel Nutshell and Gluing PDF Files with Ghostscript

0
0

It has been a chaotic couple of weeks, but I’m finally settling in Berlin. Although I haven’t found my final home yet, I finally have a reliable Internet access thanks to a little 3G USB modem. (Andreas Gohr’s blog post helped greatly in straining out some details of wvdial configuration for the German T-Mobile.)

I have been collecting a few tips and tricks about free command line utilities for some time and I plan to share them here in near future. For now, I’ll start with a single tip.

In my quest to grok the most popular kernel for GNU, I am making some distinct, albeit slow, headway into the inner workings of Linux. Before completely delving into the source code, I wanted to have a last overall look on kernel configuration, which may also end up providing some new insight relevant to the Freedom Shoppe builds.

In my search, I found Greg Kroah-Hartman’s Linux Kernel In A Nutshell.

Linux Kernel In a Nutshell

It is a concise reference guide and, even better, under a free license! And I don’t mean a semi-free license; it is genuine Attribution-Share Alike. The only point that bothered me was that every chapter and even part headings were separately packaged. But it isn’t really the GNU way to simply complain about works that you’re allowed to hack on. :-) So, I did some scroogling and found here that the Ghostscript interpreter can be used to easily glue multiple PDF’s together into one file right on the command line. Here’s how to do it:

After downloading and uncompressing the tarball of all PDF files, I had all chapters of the book (except for the cover which may be under O’Reilly’s strict copyright.) After figuring out the order of these files, I ran this command:

gs -dBATCH -dNOPAUSE -sDEVICE=pdfwrite -sOutputFile=LinuxKernelInANutshell.pdf title.pdf LKNSTOC.fm.pdf ch00.pdf part1.pdf ch01.pdf ch02.pdf ch03.pdf ch04.pdf ch05.pdf ch06.pdf part2.pdf ch07.pdf ch08.pdf part3.pdf ch09.pdf ch10.pdf ch11.pdf part4.pdf appa.pdf appb.pdf LKNSIX.fm.pdf colo.pdf

With this command, Ghostscript writes multiple files in given order into a single PDF. As you can check for yourself, files given after -sOutputFile=LinuxKernelInANutshell.pdf are original PDF files listed according to the book’s order.

I am hosting the resulting single PDF file, so feel free treat yourself to a geeky afternoon read. ;-)


Viewing all articles
Browse latest Browse all 3

Latest Images

Trending Articles





Latest Images