Skip to content

Category Archives: linux

Install soapUI on Ubuntu 11.10

Introduction This post describes how to install soapUI on Ubuntu 11.10 and solve potential issues with installation. Installation Download linux version (soapui-4.0.1-linux-bin.zip file) of soapUI 4.0.1 Unpack it to desired location Add execute permission to bin/soapui.sh file: chmod +x bin/soapui.sh Run soapUI ./soapui.sh Troubleshooting If you get following exception after running and your application closes: [...]

Make star (*) to match hidden (dot) files

To make star character in bash to match hidden files, use dotglob option: $ shopt -s dotglob If directory contains both normal and hidden (.*) files, here what you will get without and with dotglob set: $ ls * file1.txt file2.txt $ shopt -s dotglob $ ls * file1.txt file2.txt .htaccess .htpassword

Show full path to the current file in vim

I find this one very useful, when you press just CTRL-G in vim you will get some basic file information: "abc.tmp" 165 lines –36%– When you use put count (a number) 1 before that command, the path will get expanded to full path (but shortened with ~ for the home directory). So when pressed: 1 [...]

xargs, find and escaping pipe and semicolon

I wanted to iterate over set of directories and calculate total number of files inside each of them (recursively). xargs & find would do it just fine but you can not easily escape pipe inside xargs command. Here is the solution: ls | xargs -n1 -I{} sh -c ‘echo -n "{} "; find {} -type [...]

Send email from command line without x-mailer tag

I usually set my postfix to relay via gmail SMTP to allow me for reliable external email delivery from my gmail address, with the convenience of the command-line. To send an email using mail utility I can simply use: $ cat email.txt | mail email@example.com This will generate an email with default X-Mailer tag, like: [...]

ext2/ext3 partition block group error

Here is the error from dmesg I’ve got when trying to mount external HDD: [345826.197335] EXT3-fs error (device sdd1): ext3_check_descriptors: Block bitmap for group 1920 not in group (block 0)! [345826.198130] EXT3-fs (sdd1): error: group descriptors corrupted Trying to mount as ext2 didn’t change anything: [346348.544459] EXT2-fs (sdd1): error: ext2_check_descriptors: Block bitmap for group 1920 [...]

Recursively find the latest updated file

Here is the command: find . -type f -printf ‘%TY-%Tm-%Td %TT %p\n’ | sort -r | head

Automatically equalize brightness of several images

Introduction I have a collection of 160 photos that I would like to montage into a movie. Each photo was done on a different day and the brightness of each photo varies. This will definitely not look good on the photo, so I’ve decided to “normalize” the brightness across the images. That is: Find a [...]

How to find the widest image

Recently I had to locate the widest image in the set of photos in a directory. Here is how you can easily do it with identify command, from ImageMagick suit: % identify -format ‘%w %f\n’ * | sort -rn | head -n1 563 2010.12.30.JPG You can see in the output that the widest image is [...]

Resize images in bulk to the same width or height, same aspect

mogrify is the tool you are looking for – it comes with the great imagemagick package and it’s designed especially to be used for bulk operations. To resize all images in current directory to 600 pixels wide (width): % mogrify -resize 600 * The same but 600 height: % mogrify -resize x600 *