Polaris: UNIX Overview

Polaris: Unix Overview

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 user on the system is also assigned to a group. A group is a collection of similar accounts; examples of groups on UMUC's UNIX system are student, staff, and faculty.    Access to files on UNIX can be granted to the user, the group, or to everyone

Every file on the UNIX system is located in a directory. In addition to files, each directory may contain any number of subdirectories. 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, /users/student/tsimz3/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 /users/student/tsimz3, the file todolist 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 and directory names may consist of upper- 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

Many UNIX commands allow you to specify multiple filenames 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, for example, 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.