University University of
Unix - systems are characterised by a multiplicity of commands, with which over a Shell the operating system can be served. The syntax of these commands deviates under various Shell from each other. Two mainstreams, BSD exist - and System V - Derivatives. Many commands there are in several variants, meanwhile is also the GNU - Tools, which is free software, far spreads. Most commands have those one-letter options, with a hyphen to be attached and functionalitychange or extend, e.g. copies “cp - a R” recursively a whole listing, including all contents and sublists. The GNU versions permit also long option names as “cp --recursive”. In the following in parentheses one indicates, with which Unix variant the command for the first time emergesand/or. from that its spreading proceeds:
- (V7) - the command is contained in the Unix version V7 of 1979
- (BSD) - the command is part of the BSD version
- (system V) - the command is part of system V
- (GNU) - the commanda GNU command (
- sports club) is - the command is an internal command Shell
- (CSH) - the command is an internal command C-Shell
- (-) - the command is contributed by other side
table of contents
component system philosophy
the fundamental philosophy of the university X-commands is the unit construction system: Instead of large, unspezialisierter programs for whole fields of application small, for elementary tasks, are made specialized commands available which can be linked with one another, overto accomplish more complex actions.
Unix systems are served traditionally over the command line. There are in the meantime also Desktop Environments for Unix and unixartige systems, however by many users further the command line is preferred. This is also because of the fact that thoseShell (command line interpreter) under Unix are traditionally substantially more efficient than z. B. the DOS command line interpreter.
Apart from the interactive use have Shell also the task to implement Shellskripte so mentioned. These are roughly comparable with DOS batch files, are however due to the substantially better equipmentUnix Shell with control structures often clearly more efficiently. In particular make it possible Shell to link with simple syntax the command of “components”.
Some inserted commands contain of Shell. In modern Shell for example:
- test (sports club): E.g. tests conditions. - le (less or equal <=) and file characteristics
- expr (sports club): Computation of arithmetic expressions
- READ (sports club): Read a line of the input into a variable
the most important of Shell
- sports club (V7): Bourne Shell, original Shell
- csh (BSD): with one the programming language C similar syntax (C-Shell)
- ksh (system V): Grain Shell
- bash (GNU): Advancement of the Bourne Shell (Bourne Again Shell)
- tcsh (-): Advancement C-Shell (TENEX C Shell)
- zsh (ZSH): Popular one, ksh similar Shell with very many features
(further ones of Shell seeunder Unix Shell)
Unix knows 3 standard communication ways:
- Standard input (stdin), pre-setting: Keyboard
- standard output (stdout), pre-setting: Screen
- standard error message (stderr), pre-setting: Screen
filter are commands, which use these standard communication ways, e.g. the program“wc” for word COUNTs - number of words.
in/expenditure detour (English I/O redirection)
one can “bend” the standard communication ways. Usually one does that, in order to read or into a file write from a file.
- Input detour with “<“:
wc - l < test.dat
- wc - l reads from the file test.dat and writes the result on the screen. (on wc one knows however input files also as direct arguments handed over)
- expenditure detour with “>“:
LS > dir.dat
- the expenditure effected from LSinto the file you file. If this is already present, then it is overwritten.
- Expenditure detour with “>>“:
LS >> dir.dat
- the expenditure of LS to the end of the file is dir.dat attached.
- Detour of standard error with “2> “:
wc - l < test.dat 2>err.log
- error messages are written into the file err.log (not in C-Shell csh).
One finds the principle of in/expenditure detour also in the operating system MS-DOS.
a powerful aid is use of one beeps for in/expenditure detour
<kommando1> | <kommando2>
One can link several filters with one another. Usually a filter expects the input of standard input (keyboard). The expenditure takes place on the standard output (screen). With the Piping the expenditure of a command is rerouted into the standard input of the following command. ThatUnix operating system makes thereby a buffer memory range available, which decouples the implementing processes.
grep Unix test data file | sort
in the file test data file all lines are looked for, those the word “Unix” contained, these are then sorted spent.
For more complex applications leavePipes also designated defines itself, which then as a file can be accessed:
- mkfifo: designated beeps puts on
- In Shell:
mkfifo pipe LS > Pipe
- only a designated beep here put on, and then the current listinginto these rerouted.
- Afterwards in another Shell (z. B. in another window):
- “contents” by pipe is selected here and on the standard output spent. Thus the expenditure of LS from first Shell appears inthe standard output second Shell.
- Afterwards can beep like a normal file to be deleted:
rm pipewc - l < test.dat
the Unix Hilfesystem is based substantially on the Manpages in such a way specified (for manual PAGE, manual side). Ideal way is present for each command, each call of the programming interface (system functions, C-library) and each important configuration file its own one PAGE .
The manual sides are besides into durchnummerierte ranges divided, the different interfaces take off (user command, administration command, C-functions, etc.).
Assistance sides are written in the format of the text record program troff, therefore also a printed version can be generated apart from the ASCII text version for on-line announcement.
The commands of on-line manual:
- one (V7): The assistance side for a certain
- program calls manual sides (manual PAGE),a certain function, etc. up.
- a single-line short description of the commands gives.
- looks in the short descriptions for a character sequence and returns the suitable entries including short description. For example gives
- apropos color
- all entries, in which the word occurs “color”.
From GNU an alternative auxiliary system comes named texinfo, been based on hypertext. In addition, this is integrated into the editor Emacs, it gives a pure info. Browser:
- info. (GNU): Manual to a command
The following is an incomplete compilation of important university X-commands.
handling files is a substantial part of the work on the computer. Accordingly there are commands also under Unix to handling files:
- CD (sports club): Changethe current listing (CHANGE directory)
- cp (V7): (CoPy) LS (
- V7) copy file: Files in a listing indicate (cunning)
- mV (V7): a file shift or rename (move)
- pwd (V7): Announcement of the current listing path(Print Working directory)
- rm (V7): Delete a file (ReMove)
- tar (V7): Archiving program (Tape of archives)
- gzip (GNU): Kompressionstool
files are arranged under Unix (like actually on all modern operating systems) in listings.Under Unix it gives however, differently than e.g. under DOS or Windows, only one listing tree, into which contents of other data media become “hung up” if necessary.
For listing administration stand among other things the following instructions for the order:
- mkdir (V7): produces a new listing
- rmdir (V7): (empty) a listing deletes
- CD (sports club): changes into another listing
- pushd (CSH): changes into another listing, the current listing notes however before
- popd (CSH): turns in the previous listing (before the latter pushd) back
- mkfs: File system provide (MaKe file system)
- fsck (V7): File system examine (file system check)
- mount (V7) and umount (V7): File system hang up in/notices from the listing tree
- df (V7): Announcement of the free storage location on data media (disk Free)
- you (V7): Announcement of the necessary storage location of files and listings (disk Usage)
user and right administration
Unix is from the outset a multi-user operating system. That means that different users can work on the computer and before each other partitionedbecome: One can permit or forbid other users to access certain files. Additionally one can assign also groups, to which collectively determined rights of access can be granted to user. A special role plays the user root (system administrator), the access full as an only useron the system has.
Each user has typically his own homeland listing, in which only he (and roots) can put on and delete files.
- CSU (V7): Users change (substitute user)
- user ADDs or ADD user: A new user put on.
- w:Who is announced everything? And which you do?
- who (V7): Who is announced everything?
- chmod (V7): Rights of access to files change (CHANGE mode)
- chown (V7): Owners and/or group change (CHANGE OWNer)
- chgrp (V7): Group affiliation change (CHANGE GRouP)
- passwd: User password change
- ID: Spends information to the own identity: User name, user number (uid), name of the primary user group, number of the primary user group (gid)
one of the strengths of Unix its many accessories programs are, in particular (howevernot only) to the treatment of text files. The strength is based and. A. on the fact that the accessories programs easily over pipes “hooked up” to become to be able, in order to fulfill more complex tasks.
- cat (V7): Expenditure and/or concatenation of text files in the command line (conCATenate)
- CUT:Select certain columns with the expenditure.
- echo (V7): Expenditure
- grep (V7): Indicate all lines to a text file, which fit on a regular expression.
- less (GNU) and more: expenditure by page of a text file
- sort (V7): sort according to certain criteria.
- stringer: only those showsprinter graphics (ASCII) of a binary file on.
- sed (V7): powerful tools for text manipulation (Stream editor)
- awk (V7): programmable tools for data processing (Aho Weinberger Kernighan, the initial letters of the names of the inventors)
sothe commands for text manipulation are also powerful, for larger changes at texts are editors better suitably. Of course there are these also under Unix. Are far common and. A.:
- Emacs (GNU, -): efficient editor with Lisp - interpreter
- joe (-) (Joe's OwnEditor)
- pico (-): for beginner easily operated editor
- nano (-): pico-clone
- vi (BSD) (VIsual editor)
- vim (-) (Vi IMproved)
- ftp (BSD): Kommandozeilenclient for ftp (File Transfer Protocol)
- mail (V7): E-Mail send away.
- ping (BSD): sends ping to another computer.
- telnet (BSD): Client for the telnet - minutes
- ssh (-): Shell for coded connections, more surely than telnet (Secure Shell)
- rsh (BSD): (Remote Shell)
- netstat(BSD): Indicate the net connections
- ifconfig (BSD): Network interface configuration
- talc: maintain with another user.
- write (V7): Message to a user send
- barrier: Message to all users of a system send (Write UNIVERSE)
- RK (V7): Process later start
- cron: Regularly free start
- process (-): Announcement of the free storage location (volatile memory)
- kill (V7): A process terminate, and/or. other signals to it send
- killall: all processes of the indicated name terminate
- nice (V7) and renice(BSD): HP (V7)
- change priority of a process: Indicate the current processes
- pstree (-): “-” in tree form
- top (-): interactive announcement of the current processes (Table OF Processes)
- uname: Expenditure of information about operating system and computer
Cent coil system
- CC (V7): C-compiler
- GCC (GNU): GNU C compiler
- make (V7): Administration of group of programs
- lint (V7): C-code-examination
- as (V7): Assembler
- ld (V7): Left Loader
- acre (V7):
- Adb (V7): Debugger
- gdb (GNU): Gnu debugger
- Nm (V7): Symbol Table
- size (V7): Program segment sizes
- prof (V7): Profiler
- lex (V7): Lexical Analyser generator
- yacc (V7): Parser generator
text record system
Unix was developed together with the efficient text record system troff, that among other things composition of mathematical notation and tablemade possible.
Also the manual sides can be set with this system. nroff permitsthe expenditure on text terminals and line printers. The operating system-independent TeX replaced to a large extent however *roff. Also the GNU Hilfesystem texinfo works with TeX for the printout.
- troff (V7): Macro-oriented text record system for linotype Fotosatzmachinen
- nroff (V7): Macro-oriented system for terminals and line printers
- groff (GNU):GNU version of troff and nroff
- eqn (V7): Mathematical composition of mathematical notation for troff (Präprozessor)
- neqn (V7): Mathematical composition of mathematical notation for nroff (Präprozessor)
- tbl (V7): Tables for troff and nroff (Präprozessor)
- spell (V7): Right write test program
- Brian W. Kernighan, Rob Pike: The Unix toolbox - programming with UNIX, (German translation), Hanser publishing house, Munich 1986, ISBN 3446142738
Web on the left of
- a collection of open SOURCE Unix Tools for Windows
- UNIX Referenzkarte, summarizes many important instructions briefly.