DOC PREVIEW
RU CS 208 - Introduction to UNIX

This preview shows page 1-2-3-27-28-29 out of 29 pages.

Save
View full document
View full document
Premium Document
Do you want full access? Go Premium and unlock all 29 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 29 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 29 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 29 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 29 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 29 pages.
Access to all documents
Download any document
Ad free experience
Premium Document
Do you want full access? Go Premium and unlock all 29 pages.
Access to all documents
Download any document
Ad free experience

Unformatted text preview:

PowerPoint PresentationWhat is UNIX?UNIX Compared with other OSMulti-user, Multi-taskingMost Important Feature of UNIXUNIX VersionsUnix Operating System StructureWhy has Unix been successful?Unix DisadvantagesSlide 10Slide 11The Unix PromptStandard Command FormatSlide 14Basic CommandsCommands to Manipulate FilesList Files in a DirectorySlide 18Getting Helpman Examplesman Output ExampleViewing FilesExample: cat, head, tailCopying Filescp ExamplesMoving /Renaming Filesmv ExamplesDeleting Filesrm ExamplesIntroduction to UNIXCS208What is UNIX? •UNIX is an Operating System (OS). •An operating system is a control program that allocates the computer's resources, schedules tasks, and helps the user communicate with the computer.•Most popular PC operating systems: Windows 95/98/2000/XP -- proprietary, single-user OS•UNIX was developed long before Windows, about 30 years ago at AT&T Bell Labs (95% written in “C” programming language).UNIX Compared with other OS•Mature and stable OS•Large user community•Vendor-independent OS•Network-portable window system (X)•Runs on range of hardware (PC - Cray)•Common Open System Environment (COSE)–Source code is available to view and modifyMulti-user, Multi-tasking•More than one user can run at the same time and each user can run more than one task at the same time•In Unix, each program is started as a process.–A process is a program in execution.•Usually only one copy of a program, but there may be many processes running the same program.•Each interactive user may have:–only one process in foreground–may have several processes in backgroundMost Important Feature of UNIX •Most important feature of UNIX: STABILITY–30 years to get the bugs out–Important in shared environments and critical applications•Shared Environments Example: University–Windows NT crashes at least once a day in labs–UNIX servers crash about once a semester (usually due to hard disk failure)–UNIX more than 100 times more reliable than Windows!UNIX Versions •Two main types of UNIX:–BSD (Berkeley Software Distribution)/OSF–System V (developed at AT&T) •Different versions of UNIX for different hardware:–Sun Microsystem’s Solaris (and SunOS)–Hewlett-Packard’s HP-UX–IBM’s AIX–SGI’s IRIXUnix Operating System Structure•OS mediates between the user and the computerUserApplication ProgramsKernel HardwareShellWhy has Unix been successful?• UNIX is portable, because it was written in C.–Provides hardware independence.•Open System–Underlying operating system source code is available • Provides a productive environment –Allows multi-tasking and sharing of data–Excellent C development environment is built-in–Networking capabilities are built inUnix DisadvantagesUNIX is not as user-friendly as some operating systems–Command names are often cryptic–User help is not greatUNIX does not error check user commands to protect users from hurting themselves or the system–Example: Request to copy a file over an existing file will overwrite the existing file with no warning.Unix DisadvantagesUNIX is less secure than some operating systems–Developed to be used as a software development environment, in which all users are working together cooperatively. Security was traded for more convenience and flexibility.–Well-documented open code makes hacking easier.UNIX's portability also makes it less efficient on any particular hardware.–Proprietary operating systems are optimized for that hardware.Basic UNIX CommandsThe Unix PromptThe Unix Prompt•After you log in, and the startup files have been run, the shell will display a prompt$•Different shells and different systems have different prompts.–Two common prompts are $ and #.–Your prompt can be changed.•A prompt (plus a cursor) tells you that the system is ready for your commands.Standard Command FormatFormat: command [options] <arguments>•stuff in brackets is optional•boldface words are literals (must be typed as is)•<> enclosed words are args (replace appropriately)•Commands are case sensitive (mostly lowercase) •Spaces must be inserted between commands, options, argumentsStandard Command Format•Options (also called flags) modify how the command works (command behavior)–single letters prefixed with a dash “-”–combined or separated (e.g., -al = -a -l)–come before arguments•Arguments define the command scope–Optional for some commands, mandatory for others–Some commands assume a default argument if none is supplied –Usually files or directoriesBasic Commandsdate - Print the date and time$ dateWed Feb 3 12:13:07 MDT 2003$echo - Display command line input to screen$ echo Hi, I am your instructor!Hi, I am your instructor!$Commands to Manipulate Files•ls lists files in a directory (names, not the contents of files)•cat, head, tail, more display files•rm removes files (and directories)•cp copies files (and directories)•mv moves (renames) files (and directories)List Files in a DirectoryFormat: ls [-alRF…] <file-list>-a list all files including the dot files-l long format (show file type, permissions, #links, owner, etc)-R recursive list subdirectories-F list directories with file type(trailing / *)Listing Files in a DirectoryListing Files in a Directory1 drwxr-xr-x 180 root admin 512 Oct 1 ../1 drwxr-xr-x 180 root admin 512 Oct 1 ../2 -rw-r--r-- 1 smith fac 1314 Oct 3 file2 -rw-r--r-- 1 smith fac 1314 Oct 3 fileBLOCKSIZEPERMISSIONSFILETYPE# DIRECTORIESOWNERGROUPFILE SIZEMODIFY DATEFILE NAMEGetting HelpGetting Help•Check the manual pages!–For shell command, system programs, and library functions.•Format: man <command>man –k <keywords>•Man(ual) page formatNameSynopsisDescription (options, defaults, detail desc., examples)FilesSee AlsoBugsman Examples$ man manDisplays help on the man command$ man whoDisplays help on the who command$ man -k mailChecks all man pages for keyword “mail”man Output Example$ man lsReformatting page. Wait... doneUser Commands ls(1)NAME ls - list contents of directorySYNOPSIS /usr/bin/ls [ -aAbcCdfFgilLmnopqrRstux1 ] [ file... ] /usr/xpg4/bin/ls [ -aAbcCdfFgilLmnopqrRstux1 ] [ file... ]--More--(11%)spacebar - move forward one pageb – move back one pageh – more commands q – quitViewing FilesViewing Filescat concatonate and print to screen(ctrl-s and ctrl-q to


View Full Document

RU CS 208 - Introduction to UNIX

Download Introduction to UNIX
Our administrator received your request to download this document. We will send you the file to your email shortly.
Loading Unlocking...
Login

Join to view Introduction to UNIX and access 3M+ class-specific study document.

or
We will never post anything without your permission.
Don't have an account?
Sign Up

Join to view Introduction to UNIX 2 2 and access 3M+ class-specific study document.

or

By creating an account you agree to our Privacy Policy and Terms Of Use

Already a member?