> This may be a naive question, (this may already exist) but may be not:
> I am wondering if Unix/Linux provides at the file system a link to an
> object, rather than a file.
> Or this may be available at the system call level?
> This occured to me, thinking that I would like in a directory, to have a
> file wich is a link to a bziped version of a file or set of files,
> created only when used.
> Of course this reasonning could apply way beyond this.
> The potential trouble that I see is the unability to know the size of an
> object until created, but this does not seem overwelming.
> What do you think?
> Thanks for your answers.
> Andre G-
It is not supported by the Unix or Linux system calls.
It can be implemented in Linux by a special filesystem
driver. There are two filesystem drivers that does
something you might be able to use:
The compressed ROM file system (cramfs) and the autofs
filesystem. You can take a directory structure and then
using an appropriate utility compress the entire thing
into an image that can later be mounted using the cramfs
driver.
The autofs filesystem will on every request for a
nonexisting file send the name to a user space daemon
process which can then create either a directoryor a
symbolic link.
The existing autofs daemon will either create a directory
and mount a filesystem there or create a symbolic link
to an existing directory. You would need to write another
daemon that decompress the file and symlinks to the
decompressed file. After some timeout the daemon can
delete the symlink and the file. (In that order.)
Otherwise you can of course write a new filesystem driver
for the Linux kernel to do the job.
--
Kasper Dupont