Tuesday, January 22, 2013

Combine multiple PDF files to one

You can use gs (ghostscript) to combine multiple pdf files to one as follows


gs -dBATCH -dNOPAUSE -q -sDEVICE=pdfwrite -sOutputFile=combined.pdf file1.pdf file2.pdf


  • gs -- starts the Ghostscript program
  • -dBATCH -- once Ghostscript processes the PDF files, it should exit. If you don't include this option, Ghostscript will just keep running
  • -dNOPAUSE -- forces Ghostscript to process each page without pausing for user interaction
  • -q -- stops Ghostscript from displaying messages while it works
  • -sDEVICE=pdfwrite -- tells Ghostscript to use its built-in PDF writer to process the files
  • -sOutputFile=combined.pdf -- tells Ghostscript to save the combined PDF file with the name that you specified

--
This is exact copy from "link" made a note on this blog for reference in case of non-availability of the original source.

Friday, February 17, 2012

find cdrom/dvdrom device Linux

$ eject -n
eject: device is '/your/cd_dvd/device'

Saturday, October 1, 2011

Search and Replace large files inplace

using sed

find /path/to/files -type f -exec sed -i 's/fromString/toString/g' {} \;


using perl

find /path/to/files -type f -exec perl -pi -e  's/fromString/toString/g' {} \;

Thursday, June 23, 2011

Command to see CDP packets and identify the cisco switch and port your machine is connected to

# tcpdump -nn -vvv -i eth0 -s 1500 -c 1 'ether[20:2] == 0x2000'

Tuesday, March 22, 2011

Screen Capture Fedora

For screen capture with audio I have used gtk-RecordMyDesktop

# yum install gtk-recordmydesktop

Options for selecting window or fullscreen are available.

Thursday, August 5, 2010

TOra For Database Development

TOra

TOra is an open-source multi-platform database management GUI that supports accessing most of the common database platforms in use, including Oracle, MySQL, and Postgres, as well as limited support for any target that can be accessed through Qt's ODBC support. TOra has been built for various Linux distributions, Mac OS X, MS Windows, and UNIX platforms.