loopback file system

Most people think that you can only mount a directory onto another file system, which is true most of the time. Most file systems have code to prevent you from mounting a filesystem on a file,
not the loopback file system under Solaris (I’ve not checked on linux). With this lovely beast you can mount a file on top of another file.
Say you’re on an unsupported operating system
, and every time you try running a script it moans at you using a dialog that the OS you’re running on is not supported. You copy the file locally and make the changes to it. Then through the magic of lofs you issue:

# mount -f lofs /tmp/fixedfile /dist/brokenfile

then when you issue a /dist/brokenfile it runs your new /tmp/fixedfile, without you having to copy anything else to the new location.
This comes in handy when you’re trying to install a machine over NFS and you can’t write to the /etc/default/login file which has a

CONSOLE=/dev/console

.
you fix the file, use the mount -f lofs /tmp/login /etc/default/login and then you can telnet to it with ease to do some last minute checks before rebooting the machine from the comfort of your home.