?? intro
字號:
.de IR\fI\\$1\^\fR\\$2...de RI\fR\\$1\fI\\$2\^\fR\\$3...TLINTRODUCTION TO VOLUME 1.af PN i.pn 3.LPThis volume gives descriptions of the publicly availablefeatures of the.UXsystem.It does not attempt to provide perspective or tutorialinformation upon the.UXoperating system,its facilities, or its implementation.Various documents on those topics are contained inVolume 2.In particular,for an overview see `The.UXTime-Sharing System'by Ritchie and Thompson; for a tutorial see`\s8UNIX\s10 for Beginners' by Kernighan..LPWithin the area it surveys, this volume attemptsto be timely, complete and concise.Where the latter two objectives conflict,the obvious is often left unsaid in favor of brevity.It is intended that each program be describedas it is, not as it should be.Inevitably, this means thatvarious sections will soon be out of date..LPThe volume is divided intoeight sections:.DS1. Commands2. System calls3. Subroutines4. Special files5. File formats and conventions6. Games7. Macro packages and language conventions8. Maintenance.DECommands are programs intended to be invoked directly bythe user, in contradistinction to subroutines, which areintended to be called by the user's programs.Commands generally reside in directory.I /bin(for.IR bin \|aryprograms).Some programs also reside in.I/\|usr/\|bin,.Rto save space in.I /bin.These directories are searched automatically by the command interpreter..LPSystem calls are entries into the.UXsupervisor.Every system call has one or more C language interfacesdescribed in section 2.The underlying assembly language interface, coded with opcode.I sys,a synonym for.I trap,is given as well..LPAn assortmentof subroutines is available;they are described in section 3.The primary libraries in which they are kept are described in.IR intro (3).The functions are described in terms of C, but most willwork with Fortran as well..LPThe special files section 4 discusses the characteristics ofeach system `file' that actually refers to an I/O device.The names in thissection refer to the DEC device names for thehardware,instead of the names ofthe special files themselves..LPThe file formats and conventions section 5 documents the structure of particularkinds of files; for example, the form of the output of the loader andassembler is given. Excluded are files used by only one command,for example the assembler's intermediate files..LPGames have been relegated to section 6 to keep them from contaminatingthe more staid information of section 1..LPSection 7 is a miscellaneous collection of information necessary towriting in various specialized languages:character codes, macro packages for typesetting,etc..LPThe maintenance section 8 discusses procedures not intendedfor use by the ordinary user.These procedures often involve use of commandsof section 1, where an attempt has been made tosingle out peculiarly maintenance-flavored commandsby marking them 1M..LPEach section consists of a number of independententries of a page or so each.The name of the entry is in the upper corners of its pages,together with the section number, and sometimes aletter characteristic of a subcategory, e.g. graphics is 1G,and the math library is 3M.Entries within each section arealphabetized.The page numbers of each entry start at 1;it is infeasible to number consecutively the pages of a document like this that is republished in many variant forms..LPAll entries are based on a common format,not all of whose subsections will always appear..RS.LPThe.I namesubsection lists the exact names of the commands and subroutinescovered under the entry and givesa very short description of their purpose..LPThe.IR synopsis ""summarizes the use of theprogram being described.A few conventions are used, particularly in theCommands subsection:.LP.RS.B Boldfacewords are considered literals, andare typed just as they appear..LPSquare brackets [ ] around an argumentindicate that the argument is optional.When an argument is given as `name', it alwaysrefers to a file name..LPEllipses `.\|.\|.' are used to show that the previous argument-prototypemay be repeated..LPA final convention is used by the commands themselves.An argument beginning with a minus sign `\-'is often taken to mean some sort of option-specifying argumenteven if it appears in a position where a file namecould appear. Therefore, it is unwise to have fileswhose names begin with `\-'..LP.REThe.IR description ""subsection discusses in detail the subject at hand..LPThe.IR files ""subsection gives the names of files which arebuilt into the program..LPA.Isee also.Rsubsection gives pointers to related information..LPA.I diagnosticssubsection discussesthe diagnostic indications which may be produced.Messages which are intended to be self-explanatoryare not listed..LPThe.IR bugs ""subsection givesknown bugs and sometimes deficiencies.Occasionally also the suggested fix isdescribed..LPIn section 2 an.I assemblersubsection carries the assembly language system interface..LP.REAt the beginning of the volume is a table of contents,organized by section and alphabetically within each section.There is also a permuted index derived from the table of contents.Within each index entry, the titleof the writeup to whichit refers is followed by the appropriate section number in parentheses.This fact is important because there is considerablename duplication among the sections,arising principally from commands whichexist only to exercise a particular system call..SHHOW TO GET STARTED.LPThis section sketches the basic informationyou need to get started on \*(UX:how to log in and log out,how to communicate through your terminal,and how to run a program.See `\c.UXfor Beginners'in Volume 2 for a more complete introductionto the system..LP.ILogging in.\ \ .RYou must call.UXfrom an appropriate terminal..UXterminals are typified by the TTY 43,the GE Terminet 300, the DASI 300S and 450, and mostvideo terminals such asthe Datamedia 5120 or HP 2640.You must also have a valid user name,which may be obtained, together with the telephone number, from the system administrators.The same telephone numberserves terminals operating at all the standard speeds.After a data connection is established,the login procedure depends on what kind of terminalyou are using..I.I.R.R.LP.I300-baud terminals:\ \ .RSuch terminals include the GE Terminet 300 and most display terminalsrun with popular modems.These terminals generally have a speedswitch which should be set at `300' (or `30' for30 characters per second)and a half/full duplex switch which should be set atfull-duplex.(This switch will often have to be changedsince many other systems require half-duplex).When a connection is established, the systemtypes `login:'; you type youruser name, followed by the `return' key.If you have a password, the system asks for itand turns off the printer on the terminalso the password will not appear.After you have logged in,the `return', `new line', or `linefeed' keyswill give exactly the same results..LP.I1200- and 150-baud terminals:\ \ .RIf there is a half/full duplex switch, set it at full-duplex.When you have established a data connection,the system types out a few garbage characters(the `login:' message at the wrong speed).Depress the `break' (or `interrupt')key; this is a speed-independent signalto.UXthat a different speed terminalis in use.The system then will type `login:,' this time at anotherspeed.Continue depressing the break keyuntil `login:' appears in clear, thenrespond with your user name.From the TTY 37 terminal, and any other which has the `newline'function (combined carriage return and linefeed), terminate each line you type with the`new line' key,otherwise use the `return' key..LP.IHard-wired terminals.\ \ .RHard-wired terminals usually begin at the rightspeed, up to 9600 baud; otherwise the preceding instructionsapply..LPFor all these terminals, it is importantthat you type your name in lower-case if possible; if you typeupper-case letters,.UXwill assume that your terminal cannot generate lower-caseletters and will translate all subsequent upper-caseletters to lower case..LPThe evidence that you have successfullylogged in is that the Shell programwill type a `$' to you.(The Shell is described below under`How to run a program.').LPFor more information, consult.IR stty (1),which tells how to adjust terminal behavior,.IR getty (8),which discusses the login sequence in moredetail, and.IR tty(4),which discusses terminal I/O..LP.ILogging out.\ \ .RThere are three ways to log out:.IPYou can simply hang up the phone..IPYou can log out by typing an end-of-file indication(EOT character, control-d) to the Shell.The Shell will terminate and the `login: ' messagewill appear again..IPYou can also log in directly as another userby giving a.IR login (1)command..LP.IHow to communicate through your terminal.\ \ .RWhen you type characters, a gnome deep in the systemgathers your characters and saves them in a secretplace.Thecharacters will not be given to a programuntil you type a return (or newline), as described abovein.ILogging in..R.LP.UXterminal I/O is full-duplex.It has full read-ahead, which means that you cantype at any time,even while a program istyping at you.Of course, if you type during output, the printed output willhave the input characters interspersed.However, whatever you type will be savedup and interpreted in correct sequence.There is a limit to the amount of read-ahead,but it is generous and not likely to be exceeded unlessthe system is in trouble.When the read-ahead limit is exceeded, the systemthrows away all the saved characters..LPThe character `@' in typed inputkills all the preceding characters in the line, sotyping mistakescan be repaired on a single line.Also, the character `#' erases the last character typed.Successive uses of `#' erase characters back to, butnot beyond, the beginning of the line.`@' and `#' can be transmitted to a programby preceding them with `\\'.(So, to erase `\\', you need two `#'s).These conventions can be changed by the.IR stty (1)command..LPThe `break' or `interrupt' key causes an.Iinterrupt signal,.Ras does theThe \s8ASCII\s10 `delete' (or `rubout') character,which is not passed to programs.This signalgenerally causes whatever programyou are running to terminate.It is typically used to stop a long printout thatyou don't want.However, programs can arrange either to ignorethis signal altogether,or to be notified when it happens (insteadof being terminated).The editor, for example, catches interrupts andstops what it is doing,instead of terminating, so that an interrupt canbe used to halt an editor printout withoutlosing the file being edited..LPThe.IR quit ""signal is generatedby typing the \s8ASCII\s10 FS character.(FS appears many places on different terminals, most commonlyas control-\e or control-\^|\^.)It not only causes a running program to terminatebut also generates a file with the core imageof the terminated process.Quit is usefulfor debugging..LPBesides adapting to the speed of the terminal,.UXtries to be intelligent about whetheryou have a terminal with the newline functionor whether it must be simulated with carriage-returnand line-feed.In the latter case, all input carriage returnsare turned to newline characters (the standardline delimiter)and both a carriage return and a line feedare echoed to the terminal.If you get into the wrong mode, the.IR stty (1)command will rescue you..LPTab characters are used freely in.UXsource programs.If your terminal does not have the tab function,you can arrange to have them turned into spacesduring output, and echoed as spacesduring input.The system assumesthat tabs are set every eight columns.Again, the.IR stty (1)command will set or reset this mode.
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -