Latest Tips & Tricks

My latests solutions for Linux software problems.
(English Only)

Multiple images to one paged pdf file

If you want to make one pdf-file that exist of multiple A4 pages with one each page a jpg-image.

Create a directory and drop all jpg images in that directory.
Launch this command in that directory

convert *.jpg -resize 575x823^> -bordercolor '#ddd' -border 5x5 -page A4 -background white -extent 595x842 "FILE NAME.pdf"

Grep emailaddress from IMAP dir with UNDELIVERABLE messages


You send newsletter and get a hole buns of UNDELIVERABLE email back in your INbox. You find this irritating and want to cleanup your newsletter database.

To do so you probably need a list with all email addresses you want to un-subscribe.


  • First create a new IMAP directory.

Compress PDF files

Compressing PDF file can be don on many different ways. This is how I got the best result. By compressing a 14.4MB file with big HiRes pictures to a 2.7MB file for screen use.

In Ubuntu (Linux) open the PDF in a PDF viewer

Print the PDF to a file with the file -> print -> ps, name the file ( this makes a large postscript file)

Check for valid of invalid emailaddresses with egrep


If you want to check if a file, like a csv-file with e-mail-addresses for a newsletter, contains invalid formatted email-addresses then you can use this egrep command.

egrep "\w+([._-]\w)*@\w+([._-]\w)*\.\w{2,4}" emial.csv -vn

Input file email.csv is a file containing all the email-addresses.

ZPanel creates multiple backups on one day

Suddenly my ZPanel began making multiple backups on one day. Looking at the filename of the backup it looks like the backups are made 1 sec after another.

Backup has file names like this