UNIX Basics


NOTE: All icons are representative only. You should read your screen to determine the exact items you need.

About UNIX

Generally, UNIX commands are entered in lower-case letters. However, UNIX is case sensitive so any letters that you should type in upper-case will appear in upper-case letters in the instructions.



Menu

This document details:



Getting Started

There are several UNIX commands that are easy and fun to use. They are listed below with a description of what they do.

Return to Menu



Listing Your Files

Return to Menu



Displaying a File's Contents

Several commands allow you to see a file's contents displayed on the screen.

The commands follow this form: command filename

cat filename

(for conCATenate) continuously scrolls the indicated file's contents, coming to rest on the final screen of information.

more filename

pauses the display to show one screen of information at a time and shows the percent of the file already viewed.

pg filename

displays a file's contents, one page at a time.

nroff filename

displays the file's contents fully justified with one inch margins, blank lines (where present) and leading spaces on lines.

Return to Menu



Redirecting Command Output

Almost any UNIX command's output can be redirected to a new file, or the output from one command used as input for another command. The redirection symbol is >

Return to Menu



Using Directory Commands

UNIX is based on a tree-type directory structure that allows you to embed directories and files within other directories.

The following commands will help you as you work with directories on INDYUNIX:

mkdir directoryname

makes a subdirectory within the working (current) directory.

NOTE: It often can be difficult to distinguish between directories and files when you issue the ls command. One suggestion is to name files with lower-case letters and directories with an initial upper-case letter. For example, pr actice.txt (a file) and Memos (a subdirectory).

cd directoryname

changes to a lower level subdirectory.

cd ..

changes to the next higher level subdirectory.

cd

changes from whatever subdirectory you are currently in to your home directory.

pwd

displays the current path.

rmdir directoryname

removes the specified directory.

Return to Menu



Using File Commands

cp oldfilename newfilename

makes a duplicate of an existing file and gives it the specified new name.

rm filename

deletes the specified file.

mv oldfilename newfilename

renames an existing file and gives it the specified new name. (Remember, UNIX is case sensitive.)

mv oldfilename directoryname

moves an existing file into the specified directory.

Return to Menu



Getting Help

There are several types of online help available to help you learn UNIX:

learn

(tutorial) includes instruction and opportunity for practice on files, editor, morefiles, macros, eqn, and C.

apropos

locates commands by keyword. If you don't know a specific UNIX command name, use apropos to help locate that command.

help

lists basic commands.

man

(MANual pages)displays reference manual entries.

Info-Explorer

connects an online information base of articles by hypertext links. Hypertext links allow you to jump directly to information on specific keywords within an article without the need to traverse through layers of articles.

Return to Menu


Original: 1995 ALB - IT
Updated: 7 February 1996 Tom Johnson - IT