Mount file as disk in Linux

An example of using dd to create a 1GB file.

dd if=/dev/zero of=testfile bs=1M count=1024

Or alternatively, create a sparse file ( very quick to create, but will lead to fragmentation later)

dd if=/dev/zero of=testfile bs=1M seek=1024 count=0

Large files can be formatted with a file system and mounted:

mkfs.ext3 -F testfile
mount -o loop -t ext3 testfile /mnt
umount /mnt
Mount file as disk in Linux

How to open a .eml file in Outlook 2007

If you try to open a .eml file in Outlook 2007, it will create a new message containing the .eml file as an attachment.

In order to read .eml files from Outlook 2007, you need to pass the /eml argument to outlook.exe . This Microsoft kb article describes how to tweak the windows registry to accomplish this.

Essentially you need to edit the HKEY_CLASSES_ROOT/Microsoft Internet Mail Messageshellopencommand default value to :
“%ProgramFiles%Microsoft OfficeOffice12OUTLOOK.EXE” /eml “%1”

To revert back to using Outlook Express, set the value of the same key to:
“%ProgramFiles%Outlook Expressmsimn.exe” /eml:%1

How to open a .eml file in Outlook 2007

Common RPM commands

RPM reference cheatsheet:

Install/Upgrade a package

rpm -Uvh package.rpm

Install an old version of a package

rpm -Uvh --oldpackage oldpackage.rpm

Query which package installed a given file

rpm -qf /bin/cp

To force a package to overwrite conflicting files

rpm -Uvh --replacefiles package.rpm

To list files owned by an installed package

rpm -ql package

List scripts inside rpm file (pre, post scriptlets)

rpm -qp --scripts /tmp/ods-dsc-1.0-18.13201_centos53.noarch.rpm
Common RPM commands