UNIX, KSIĄŻKI, ==Kawały textowe==
[ Pobierz całość w formacie PDF ]
A Brief Introduction to UnixWith Emphasis on the Unix PhilosophyAnd How to Apply it to Do Your WorkbyCorey Sattencorey@cac.washington.eduNetworks and Distributed Computing, CACUniversity of Washington, HG-45Seattle, Washington 98195OverviewUnlike a traditional introduction to Unix, the emphasis ofthis one is on philosophy and brevity. When you understand howthe creators of Unix intended you to use it, you'll approach Unixon it's "best side". This introduction intends to help a newUnix user get started on the right foot quickly. For more infor-mation, readers are referred to the Unix manuals and other listedreferences. As little detail as possible has been duplicatedfrom the manual.Copyright (C) 1989, University of WashingtonCommercial use of this document requires permission from NDCVersion 1.24 - last modified July 27, 19891. Why Use Unix?In some ways, Unix is "old technology" - it was invented inthe late 1960's for a small computer with a 64K-byte addressspace, it is largely character oriented (not graphic). Why is itstill here? Why is it spreading to more and more systems fromPC's to Cray Supercomputers? One answer is that Unix is writtenin a mostly machine independent way (in the high levellanguage "C") and is therefore more easily moved to new machines.Once Unix has moved, a large base of applications also moveseasily and your investment in learning Unix continues to pay off.Another answer is that many problems are still character oriented(or at least can be approached that way) and for these problems,like a sharp tool in the hands of a skilled user, Unix reallyhelps you get your work done. Also, you can use Unix from anykind of terminal and over dial-up phone lines or computer networkconnections.In the space below, I hope to convey, with a minimum ofspecific information, the essence of "The Unix Philosophy" sothat you can use and enjoy Unix at its best. To try to summarizein just two sentences (for those who really believe in such brev-ity): Unix comes with a rich set of connectable tools which,even if they don't directly address the problem at hand, can beconveniently composed (using the programmability of the commandinterpreter) into a solution. Unix also imposes relatively fewarbitrary limits and assumptions on the user or the problemdomain and has thereby proven to be a suitable platform on whichto build many useful and highly portable research and commercialapplications.2. Essential Commands and ConceptsBefore I can realistically hope to say more about Unix ingeneral, or give meaningful examples, I must briefly explain someUnix commands and concepts. These descriptions are intentionallyminimal. You will soon see how to find more detail in the manu-als.2.1. LoginUnix is a multi-user operating system. This means thatseveral users can share the computer simultaneously. To protecteach user's data from damage by other users, Unix requires eachuser "login" to the system to identify him/herself (with a loginname) and authenticate him/herself (with a password). During thelogin process, a user's defaults and "terminal type" are usuallyestablished. The mechanism Unix uses to allow concurrent usersalso allows each user to have more than one program (also called"process" or "commands") running concurrently. You will seeshortly how convenient this is.- 1 -2.2. The Shell, Commands and ArgumentsOnce you have logged in, you will be running a programcalled your "login shell". The shell is a program which executesthe commands you type in and prompts you when it is ready forinput. One of the nice features of the Unix shell is that it isa powerful programming language unto itself, however one need notprogram it to use Unix. There are several different "shell" pro-grams in common use: csh (c-shell), sh (bourne-shell), ksh(korn-shell), vsh (visual-shell) to name a few. Most people use"csh".Unix commands consist of a program name followed by options(or arguments) to that program (if any). One or more spaces fol-low the program name and separate arguments. Each program exam-ines its argument list and modifies its behavior accordingly. Byconvention, arguments which begin with a dash are called"switches" or "flags" and they are used to request various non-default program behavior or to introduce other arguments. It isoccasionally important to remember that it is the shell whichdoes filename expansion (such as turning "*.old" into "a.oldlist.old program.old"). Programs normally don't ever see un-expanded argument lists. Many Unix programs can also take impli-cit arguments. These are available (to every program you run)via the "environment". Your "terminal type", stored in anenvironment variable called TERM, is an example of this. Themanual for each program you use should list the environment vari-ables it examines and the manual for your shell explains environ-ment variables in detail.2.3. On-line ManualsBefore getting into any specific commands and examples, notethat most Unix systems have both on-line and printed manuals.Many commands will be mentioned below in passing without explana-tion. It is assumed that the interested reader will look them upin the manual.The on-line manuals generally contain only the numbered sec-tions of the printed manuals. The tutorials and in-depth arti-cles are usually only in printed form. This introduction intendsto reproduce as little of the information contained in the Unixmanuals as possible. For more information on any Unix command,type "man command" ("man man", for example gets you "the man-page" for the on-line manual command: man). (Note: if you areprompted with the word "more", you are interacting with the"more" program. Three quick things to know: you may type a spaceto get the next screenful, the letter "q" to quit, or "?" for ahelp screen.)Among other things, the man-page for the "man" commandpoints out that "man -k word" will list the summary line of allon-line man-pages in which the keyword: word is present. Forexample, "man -k sort", will produce something like this:- 2 -comm (1) - select or reject lines common to two sorted fileslook (1) - find lines in a sorted listqsort (3) - quicker sortqsort (3F) - quick sortscandir, alphasort (3)- scan a directorysort (1) - sort or merge filessortbib (1) - sort bibliographic databasetsort (1) - topological sortThis tells you that section 1 (user commands) of the manual hasman-pages for comm, look, sort, sortbib, tsort. Use the man com-mand on any of these to learn more. The other numbered sectionsof the Unix manual are for system calls, subroutines, file for-mats, etc. You can find out about each section of the manual bysaying, for example, "man 2 intro". Enough about manuals.2.4. I/O re-direction: stdin, stdout, stderr, pipesBy convention, whenever possible, Unix programs don't expli-citly specify from-where to read input or to-where to write out-put. Instead, programs usually read from "standard input" (stdinfor short) and write to "standard output" (stdout). By default,standard input is the keyboard you logged in on and standard out-put is the associated display, however, the shell allows you tore-direct the standard output of one program either to a "file"or to the standard input of another. Standard input can be simi-larly redirected. Perhaps Unix's greatest success comes from theability to combine programs easily (by joining their standardinputs and outputs together forming a pipeline) to solve poten-tially comple...
[ Pobierz całość w formacie PDF ]
-
Menu
- Start
- US Army - Electrical Design- Lightning and Static Electricity Protection, 04. 01. ELECTRICAL, 01. Książki elektrotechnika, 05. Protections, 003. Protections Lightning
- Udział inteligencji prawniczej Królestwa Polskiego w kształtowaniu kultury książki 1815-1915 Koredczuk Bożena E-BOOK, Kultura i sztuka
- Ukraiński. Kurs podstawowy A1-A2 książka + 2 CD. Nowa edycja praca zbiorowa jak pobrać, Inne
- USO de la gramatica espanola elemental książka Nowa edycja Castro Francisca PEŁNA WERSJA, Nauka języków
- Uczeń Jedi - Obrońcy Umarłych - Jude Watson, Książki Fantasy i SF
- Uczeń Jedi - Narodziny Mocy - Dave Wolverton, Star Wars - Książki
- Uczeń Jedi - Niepewna Ścieżka - Jude Watson, Star Wars - Książki
- Uczen Jedi 01 - Narodziny Mocy - Dave Wolverton, ksiażki
- Uczen Jedi (tom 7 - Swiatynia w niewoli), Książki Fantasy i SF
- Uklad napedowy ze sruba nastawna - sterowanie i eksploatacja, ksiazki szkola
- zanotowane.pl
- doc.pisz.pl
- pdf.pisz.pl
- trendy-girls.htw.pl