"Rags" is a simple inventory management system for preloved clothing stores that sell on consignment. It  tracks inventory, records sales and calculates payments to consigners for 'sell on consignment' clothing stores. I wrote it in early 2000 as an exercise in Perl programming for Linux and MySQL.

The latest version is packaged in RPM format for Centos 7.0.

Because Linux is a multi-user system - whether operated stand-alone or as a network server - it becomes important to keep users' files separate and to enforce access controls to minimise either accidental or malicious damage to files. While this is obviously most useful in the corporate/academic world for which UNIX was designed, it is even useful in a home setting, as any parent of several squabbling children can attest!

This question often pops up in discussion. The commonly-expressed rule of thumb is that the swap partition should be at least three times larger than the amount of RAM in the computer. "But", I hear you cry, "I have a four gigabytes of RAM in the computer - surely I could get along with virtually no swap partition at all?".

In an earlier article, I mentioned conversion of graphics file formats at the command line. However, you can also resize graphics, too - this is a particularly useful trick when you want to create thumbnails or smaller versions of high-res images for use in web pages or emails.

The trick is to master the Image Magick convert command, and to know the aspect ratio of the images to be converted. For example, if your camera produces images at 1600 x 1200 resolution, you might find that quartering the size in each dimension gives you pictures that are ideal for web page use, but only one-sixteenth the file size (hence 16 x faster loading!). To convert a picture of your new case mod down to sixteenth-size, then, use this command:

convert -size 400x300 office.jpg -resize 400x300 +profile '*' office-400.jpg

The convert command can do a lot of other things, too, such as making background colours transparent, sharpening  or blurring images, or even applying an oil-painting effect.

Another nice thing - ImageMagick can be installed on Windows, too!

Sometimes the growth of a filesystem (particularly /home ) means that it is necessary to find it a new home; in other words, add another physical disk and relocate the filesystem to its new home where there is room to grow.

Here is the procedure for adding another drive, with a single partition which will become the new /home filesystem (I'm assuming fdisk has already been used to partition it):

As root:

# mkdir /mnt/newhome
# mkfs –t ext2 /dev/hdb1
# mount /dev/hdb1 /mnt/newhome
# (cd /home && tar cf - .) | (cd /mnt/newhome && tar xpf -)


# umount /home
# mv /home /home.old
# mkdir /home
# umount /mnt/newhome
# mount /dev/hdb1 /home

Once the new /home directory tree has been checked out, you can then safely

# rm –rf /home.old
# rmdir /mnt/newhome

to clean up. Don't forget to edit /etc/fstab to mount the new filesystem into /home!


It is also possible to move subdirectory trees between systems using a refinement of the above technique of piping between tars. For example:

(cd /home && tar cf .) | ssh backuphost (cd /var/backup && tar xpf -)

will back up the contents of the home directory from one system to another.