Linux Ask!

Linux Ask! is a Q & A web site specific for Linux related questions. Questions are collected, answered and audited by experienced Linux users.

Combine multiple images into a single image with ImageMagick

Answer:

With the powerful ImageMagick program, we can easily handle common graphics tasks using command only.

For example, to combine multiple images into a single image, we need just one command:

# convert file1.jpg file2.jpg file3.jpg +append -quality 90 'output.jpg'

The above command (file1.jpg file2.jpg file3.jpg) into the file output.jpg with quality set to 90.

Show current Postfix queue listing

Answer:

To show the current Postfix queue, you can try the command "postqueue"

# postqueue -p

-Queue ID- --Size-- ----Arrival Time---- -Sender/Recipient-------
BD7E2BF973      972 Sat Aug 27 08:57:54  no-reply@example.com
(connect to alt4.gmail-smtp-in.l.google.com[209.85.143.27]:25: Connection timed out)
                                         johndoe@gmail.com

Post a file to a server using the Curl command

Answer:

You can simulate a HTTP form post, with a file being uploaded to a remote server using the curl command.

curl -F 'photo=@/upload/image.jpg' http://example.com/upload.php

Assume the name of the form element of your upload is called "photo"

Debug and verify Postfix configurations

Answer:

A simple way to debug and verify your Postfix configurations is the use the sendmail command with the -bv flag.

Example:

# sendmail -bv username@example.com

No email will be sent using the above command, it just report after verifying each recipient address. This is very useful for testing the Postfix configurations.

Create a transparent image using ImageMagick

Answer:

You can use the following command to create an empty png file, using the ImageMagick.

# convert -size 100x100 xc:none empty.png

an empty png of size 100x100 will be created.