Previous: Yeah, this is all neat, but....

Up: AFS Commands

Next: pts


The command fs is actually not a single command, but a whole group of commands that allow you to query the fileserver and set permissions.

One important command to know is fs listquota (abbreviated fs lq). This returns the disk usage and quota for whatever volume you happen to be in (if there are no arguments) or for whatever volume you give it. For example,

athena% fs lq /afs/sipb/project/sipb
Volume Name            Quota    Used    % Used   Partition
project.sipb.readonly  110000  109849      100%<<       87%     <<WARNING
This shows you the disk quota and the usage for the volume volume.sipb.readonly. Note that this is a readonly volume, as described in section 4.1.

Two other commands are fs setacl (or fs sa), and fs listacl (or fs la). These commands allow you to change and list the permissions on any particular directory. For example, suppose user jis wanted to make his scheme directory world-readable. To find out what the current permissions on the directory are, he would do the following:

athena% fs la  /scheme
Access list for /mit/jis/scheme is
Normal rights:
  system:expunge ld
  jis rlidwka
This shows that jis has all permissions on his scheme directory, while the group system:expunge (the magical little demons who clean out your deleted files every once in a while) has list and delete permissions. Now, he wants give anyone the ability to read his scheme directory. While he is at it, he wants to give his trusted friend srz write permission on his scheme directory. He would type:
athena% fs sa  /scheme system:anyuser read
athena% fs sa  /scheme srz write
Note that the syntax of the setacl command is fs sa directory who permissions. Note also that in this example we used the aliases read and write. In all there are four such aliases: read, which is the same as r and l access; write, which expands to r, l, i, d, w, and k access; all, which means all kinds of access (r, l, i, d, w, k, and a); and none, which sets no access.

Now jis wants to see his new list of acls, so he types:

athena% fs la ~/scheme
Access list for /mit/jis/scheme is
Normal rights:
  system:expunge ld
  system:anyuser rl
  srz rlidwk
  jis rlidwka
In addition to the fs listacl and fs setacl commands, there are other fs command arguments which allow you to do everything from create mountpoints (see section 4.1) to query the servers. For example:
fs mkmount, or fs mkm
As mentioned before, this command allows you to create a mountpoint, such as the one used for OldFiles.
fs lsmount, or fs lsm
This lists information about a mountpoint, most importantly the specific name of the mounted volume. For example, fs lsm /afs/sipb gives the following:
'/mit/sipb' is a symbolic link, leading to a mount point for volume

fs whereis
This command tells you on which server a file or a directory is located. You can use it in the form fs whereis ~ to find out on which server your home directory is stored.
fs checkservers, or fs checks
This command will tell you what servers are currently down.
fs help
This will give you information about various fs arguments and what each one does. You can also type fs help argument for more information about a particular argument.