Nova: UNIX Overview

UNIX Account Names
Everyone who uses the UNIX system has a unique account name. The system uses the account name to determine which files you have permission to access. The system knows which files belong to you because your account is designated as the owner of those files.

Each account name is assigned to a group. A group is a collection of similar accounts. Examples of groups on the University of Maryland University College UNIX system are student, staff, and faculty. If you have a numbered class account, everyone in your class will be in the same group (for example, cm325x). Access to files on UNIX can be granted to the user, the group, or to everyone.

UNIX Directory Structure
Every file on the UNIX system is located in a directory. In addition to files, each directory may contain any number of sub-directories. The arrangement of directories on the UNIX system may be pictured as an upside-down tree.

The directory tree begins at the "root" directory, which is indicated by a slash (/). With the exception of the root directory, every directory has exactly one parent directory. Every file has an absolute path name, which is the specific path needed to get to the file from the root directory. The directories along the path are separated by slashes.

In the diagram below, /class/cm325x/50/prog1.c would be the absolute path name of the file prog1.c. Similarly, each file can be specified by a relative path name, which depends on the current working directory. If the working directory were /class/cm325x/50, the todolist file could be referenced by the relative path name work/todolist.

Each user has a home directory where files and directories can be created. When you sign onto the system, you are placed in your home directory.

UNIX File Names
UNIX file and directory names may consist of uppercase and lowercase letters, numbers, and a variety of special characters (periods, hyphens, underscores, and so on). All names are case sensitive; for example, mail, Mail, and MAIL are considered to be different names.

Specifying Multiple File Names and Wildcards
Many UNIX commands allow you to specify multiple file names by using wildcard characters. UNIX wildcard characters are similar to those used in MS-DOS.

The asterisk (*) character matches any character.
The pattern *.c would therefore match any files with names that end in .c such as prog.c, test.c, and my.file.c.

The question mark (?) matches any single character.
The pattern prog?.c would include files such as prog1.c and progA.c but not prog.c.

The square brackets, ([]), match any of a specific set of characters; the characters to match are specified between the brackets. A range of characters can also be specified within the brackets by a hyphen (-).
For example, the pattern [a-z]* matches all files with names that begin with any lowercase letter, and the pattern [BORT]* matches all files with names that begin with the uppercase letters B, O, R, or T.