Creating cross-plat directories in AFS
AFS associates a sysname with each type (operating system and version) of machine it is running on. For example, the sysname for a Facilitized Redhat FC5 host in the cs.cmu.edu AFS cell would be i386_fc5. The actual value of the sysname is cell specific. You can find out the system of a Unix host that you logged into by typing:
fs sysname
A list of AFS sysnames for some supported plat s in the cs.cmu.edu cell can be found in the file /afs/cs/service/systypes
.
When you access a file in AFS, if one of the components in the file's path is the string @sys, AFS will substitute the sysname in place of that component. For example, if you are on an Ubuntu 16.04 host in the cs.cmu.edu AFS cell and run:
cat /afs/cs/user/bovik/@sys
you will list the contents of the file called:
/afs/cs/user/bovik/amd64_u1604
One can use this feature of AFS to create cross-plat directories for plat -specific files, such as executables and libraries. One common method of doing so is to:
- Create a directory called .bin in your AFS home directory.
- Within this .bin directory, create subdirectories named after each of the sysnames you care about. For example:
mkdir .bin/i386_fc5 mkdir .bin/amd64_u1604
3. Then create a symbolic link from a directory called bin in your home directory to .bin/@sys by running a command such as:
ln -s .bin/@sys bin
The above example assumes you are in the directory where you originally created the .bin directory. The same general method can be used to create plat -specific lib and other directories.
Was this page helpful?
Use this box to give us feedback on this webpage and its content. If you need a response, please include your Andrew ID.
Need technical support? Submit a ticket