Why Web Directory Shortcuts are Useful
AFS is an undeniably powerful tool for campus webmasters. However, AFS long directory paths can be awkward and cumbersome to use -- especially if you're juggling
one or more large departmental websites. Whether you're directly editing HTML documents from OIT's gl.umbc.edu Unix
servers, or creating webpages from your personal PC and uploading the results to the appropriate webspace using SCP, you will need to traverse the far-flung limbs
of UMBC's AFS tree and locate the correct directories.
For example, I currently edit numerous UMBC websites that require that I periodically jump between different AFS regions. This webpage (when completed) will be placed
in a web directory housing OIT's Web Development guides, which share the main URL of www.umbc.edu/oit/webdev/). The
corresponding AFS path for these documents is /afs/umbc.edu/public/www/oit/webdev/. Other draft documents I've been
editing are warehoused within my personal account's public webspace, which originate from the /afs/umbc.edu/users/v/e/vergil/pub/www/ AFS path.
Thankfully, I can use two sorts of Unix shortcuts that will immediately place me in the AFS directories I wish to work from, instead of having to use the Unix cd (change directory) command and correctly type out the lengthy path to my destination directory. These two kinds of
time-saving shortcuts are known as aliases and symbolic
links. Both types of shortcuts must be created from the Unix command line of a gl.umbc.edu server.
Using Unix Aliases to Speed Your Way Through AFS
Unix aliases are quite simple in function: each alias you create allows you to substitute a lengthy, difficult to
remember command for a single, short word or string. Aliases are quite convenient in situations where you find yourself repetitively typing the same complex commands
or arguments, and wish to save time by invoking such commands with a brief abbreviation. If I tired of having to type cd /afs/umbc.edu/public/www/oit/webdev/ every time I wanted to move into OIT's Web Development directory, I could create an alias so the word
webdev would accomplish the same task. The text of this alias would look like this:
Making Directory Shortcuts with Symbolic Links
Like Unix aliases, symbolic links allow you the convenience of quickly jumping to AFS directories without having to remember and write out long absolute paths.
Compared to web aliases, symbolic links (also known as "soft links") are much easier to create. To create a symbolic link to another directory, follow the steps listed below.
So (sticking with the same example), if I wanted to make a symbolic link to the OIT Web Development directory, I'd type
Although you'll need to create symbolic links from the Unix command line, you can use them to jump between directories no matter what protocol or program you use to interact with
your AFS account space. If you've logged into a gl Unix server using the graphical WinSCP program, you should be able to click on the folder icon representing your symbolic link and
be presented with the contents of the linked directory.
alias webdev "cd /afs/umbc.edu/public/www/oit/webdev/". Actually creating Unix aliases is a several step
process, described in detail below.
ln -s [directory path] [name of symbolic link].
ln -s
/afs/umbc.edu/public/www/oit/webdev/ webdev.