Unix Hints

This page lists Unix hints that you might find useful for CMPS 111. Topics include

Using AFS access control lists (ACLs) on unix.ic

The main computer system at UC Santa Cruz (unix.ic) uses AFS to store its files. AFS supports, among other things, a flexible way of specifying who can access files in particular directories. This can be useful when you want to share a directory with another user, such as your project partner.

AFS permissions apply to entire directories, not just files. You can allow another user (username in the example) to read and write all of the files in a directory (dir in the example), as well as create and delete files, with the following command:

fs sa dir username rlidw

Note that this will only affect dir, not any directories currently below it. However, new directories created inside dir inherit their access lists from the access list of the parent when the new directory is created.

If you want to remove permissions for a user, use the following command:

fs sa dir username none

You can also list the permissions for a directory with:

fs la dir

tar and gnutar

Often, it's useful to move files around in large numbers. Rather than copy all of the files, it's usually more convenient to use tarballs—compressed tar files. These are files created by the Unix tar program and then compressed using (typically) gzip. The GNU tar program (called gtar on unix.ic) can do compression as part of creating or unpacking a tar file without the need for a second command. Sample gtar commands include:

RCS (Revision Control System)

 

 


Last updated 18 Oct 2004 by Ethan L. Miller (elm at ucsc dot edu)