Symbolic prefixes

QNX SDP8.0System ArchitectureDeveloperUser

We've discussed prefixes that map to a resource manager. A second form of prefix, known as a symbolic prefix, is a simple string substitution for a matched prefix.

You create symbolic prefixes using the POSIX ln (link) command. This command is typically used to create hard or symbolic links on a filesystem by using the -s option. If you also specify the -P option, then a symbolic link is created in the in-memory prefix space of procnto.

Command Description
ln -s existing_file symbolic_link Create a filesystem symbolic link.
ln -Ps existing_file symbolic_link Create a prefix tree symbolic link.

Note that a prefix tree symbolic link will always take precedence over a filesystem symbolic link.

For example, assume you're running on a machine that doesn't have a local filesystem. However, there's a filesystem on another machine available over NFS (mounted at /nfs_host) that you wish to access as /bin. You accomplish this using the following symbolic prefix:
ln -Ps /nfs_host/x86_64/bin  /bin

This will cause /bin to be mapped into /nfs_host/x86_64/bin. For example, /bin/ls will be replaced with the following: /nfs_host/x86_64/bin/ls

Page updated: