UNIX System V User's Guide Second Edition

Total Page:16

File Type:pdf, Size:1020Kb

UNIX System V User's Guide Second Edition ATs.T -vstem USER'S Gl..JDE / Second Edition , , .' UNIX® System V User's Guide -. ~- AT&T UNIX® System V User's Guide, Second Edition AT&T Prentice-Hall, Inc., Englewood Cliffs, NJ 07632 Library of Congress Catalog Card Number: 87-60147 Editorial/production supervision: Karen S. Fortgang Cover illustration: Jim Kinstry Manufacturing buyer: S. Gordon Osbourne ©1987, 1986 by AT&T. All Rights Reserved. IMPORTANT NOTE TO USERS While every effort has been made to ensure the accuracy of all information in this document, AT&T assumes no liability to any party for any loss or damage caused by errors or omissions or statements of any kind in the UN/~ System V User's Guide, its updates, supplements, or special editions, whether such errors are omis­ sions or statements resulting from negligence, accident, or any other cause. AT&T further assumes no liability arising out of the application or use of any product or system described herein; nor any liability for incidental or consequential damages arising from the use of this document. AT&T disclaims all warranties regarding the information contained herein, whether expressed, implied or statutory, includ­ ing implied warranties or merchantability or fitness for a particular purpose. AT &T reserves the right to make changes without further notice to any products herein to improve reliability, function or design. No part of this publication may be reproduced, transmitted or used in any form or by any means - graphic, electronic, mechanical or chemical, including photocopy­ ing, recording in any medium, taping, by any computer or information storage and retrieval systems, etc. without prior permission in writing from AT&T. Dataphone is a registered trademark of AT &T. DOCUMENTER'S WORKBENCH is a trademark of AT&T. HP is a trademark of Hewlett-Packard. IBM is a registered trademark of International Business Machines. Teletype is a registered trademark of AT&T. UNIX is a registered trademark of AT&T. All rights reserved. No part of this book may be reproduced, in any form or by any means, without permission in writing from the publisher. Printed in the United States of America 10 9 8 7 6 5 4 ISBN 0-13-940545-3 025 Prentice-Hall International (UK) Limited, London Prentice-Hall of Australia Pty. Limited, Sydney Editora Prentice-Hall do Brasil, Ltda., Rio de Janeiro Prentice-Hall Canada Inc., Toronto Prentice-Hall Hispanoamericana, S.A., Mexico Prentice-Hall of India Private Limited, New Delhi Prentice-Hall of Japan, Inc., Tokyo Prentice-Hall of Southeast.Asia Pte. Ltd., Singapore Table of Contents Preface xi Part 1: UNIX System Overview Chapter 1: What is the UNIX System? What the UNIX System Does How the UNIX System Works 3 Chapter 2: Basics for UNIX System Users 14 Getting Started 14 The Terminal 15 Obtaining a Login Name 26 Establishing Contact with the UNIX System 27 Part 2: UNIX System Tutorials Chapter 3: U sing the File System 39 Introduction 39 How the File System is Structured 40 Your Place in the File System 42 Organizing a Directory 54 Accessing and Manipulating Files 69 Summary 113 TABLE OF CONTENTS v Table of Contents ------------------ Chapter 4: Overview of the Tutorials 114 Introduction 114 Text Editing 115 The Shell 120 Communicating Electronically 125 Programming in the System 126 Chapter 5: Line Editor Tutorial (ed) 127 Introducing the Line Editor 127 Suggestions for Using this Tutorial 128 Getting Started 129 Exercise 1 140 General Format of ed Commands 141 Line Addressing 142 Exercise 2 156 Displaying Text in a File 157 Creating Text 160 Exercise 3 168 Deleting Text 170 Substituting Text 175 Exercise 4 184 Special Characters 186 Exercise 5 197 vi USER'S GUIDE ------------------- Table of Contents Moving Text 199 Exercise 6 208 Other Useful Commands and Information 209 Exercise 7 219 Answers to Exercises 220 Chapter 6: Screen Editor Tutorial (vi) 239 Introduction 239 Getting Started 242 Creating a File 245 Editing Text: the Command Mode 248 Quitting vi 256 Exercise 1 259 Moving the Cursor Around the Screen 260 Positioning the Cursor in Un displayed Text 278 Exercise 2 290 Creating Text 292 Exercise 3 297 Deleting Text 298 Exercise 4 305 Modifying Text 306 Cutting And Pasting Text Electronically 314 Exercise 5 319 TABLE OF CONTENTS vii Table of Contents ------------------ Special Commands 320 Using Line Editing Commands in vi 322 Quitting vi 330 Special Options for vi 333 Exercise 6 336 Answers To Exercises 337 Chapter 7: Shell Tutorial 344 Introduction 344 Shell Command Language 345 Command Language Exercises 380 Shell Programming 381 Modifying Your Login Environment 436 Shell Programming Exercises 443 Answers To Exercises 445 Chapter 8: Communication Tutorial 452 Introduction 452 Exchanging Messages 453 mail 454 mailx 467 mailx Overview 468 Command Line Options 470 How to Send Messages: the Tilde Escapes 471 viii USER'S GUIDE ----------------- Table of Contents How to Manage Incoming Mail 483 The .mailrc File 493 Sending and Receiving Files 498 Networking 518 Appendix A: Summary of the File System 529 Appendix B: Summary of UNIX System Commands 532 Appendix C: Quick Reference to ed Commands 537 Appendix D: Quick Reference to vi Commands 542 Appendix E: Summary of Shell Command Language 551 Appendix F: Setting Up the Terminal 558 Glossary 568 Index 583 TABLE OF CONTENTS ix Preface The material in this guide is organized into two major parts: an overview of the UNIX operating system and a set of tutorials on the main tools available on the UNIX system. A brief description of each part follows. The last section of this Preface, "Notation Conventions," describes the typographical notation with which all the chapters of this Guide conform. You may want to refer back to this section from time to time as you read the Guide. System Overview This part consists of Chapters 1-3, which introduce you to the basic princi­ ples of the UNIX operating system. Each chapter builds on information presented in preceding chapters, so it is important to read them in sequence. • Chapter 1, "What is the UNIX System?," provides an overview of the operating system. • Chapter 2, "Basics for UNIX System Users," discusses the general rules and guidelines for using the UNIX system. It covers topics related to using your terminal, obtaining a system account, and establishing contact with the UNIX system. • Chapter 3, "Using the File System," offers a working perspective of the file system. It introduces commands for building your own directory structure, accessing and manipulating the subdirectories and files you organize within it, and examining the contents of other directories in the system for which you have access permission. UNIX System Tutorials The second part of the Guide consists of tutorials on the following topics: the ed text editor, the vi text editor, the shell command language and programming language, and electronic communication tools. For a thorough understanding of the material, we recommend that you work through the examples and exercises as you read each tutorial. The tutorials assume you understand the concepts intro­ duced in Chapters 1-3. PREFACE xi Preface • Chapter 4, "UNIX System Capabilities," introduces the four chapters of tutorials in the second half of the Guide. It highlights UNIX system capa­ bilities such as command execution, text editing, electronic communication, programming, and aids to software development. • Chapter 5, "Line Editor Tutorial (ed)," teaches you to how to use the ed text editor to create and modify text on a video display terminal or paper printing terminal. • Chapter 6, "Screen Editor Tutorial (vi)," teaches you how to use the visual text editor, vi, to create and modify text on a video display terminal. vi, the visual editor, is based on software developed by The University of Califor­ nia, Berkeley, California; Computer Science Division, Department of Electrical Engineering and Computer Science, and such software is owned and licensed by the Regents of the University of California. • Chapter 7, "Shell Tutorial," teaches you to how to use the shell, both as a command interpreter and as a programming language used to create shell programs. • Chapter 8, "Communication Tutorial," teaches you how to send messages and files to users of both your UNIX system and other UNIX systems. Reference Information Six appendices and a glossary of UNIX system terms are also provided for reference. • Appendix A, "Summary of the File System," illustrates how information is stored in the UNIX operating system. • Appendix B, "Summary of UNIX System Commands," describes, in alphabetical order, each UNIX system command discussed in the Guide. xii USER'S GUIDE Preface • Appendix C, "Quick Reference to ed Commands," is a quick reference for the line editor, ed. (For details, see Chapter 5, "Line Editor Tutorial.") The commands are organized by topic, as they are covered in Chapter 5. • Appendix D, "Quick Reference to vi Commands," is a reference for the full screen editor, vi, discussed in Chapter 6, "Screen Editor Tutorial (vi)." Commands are organized by topic, as covered in Chapter 6. • Appendix E, "Summary of Shell Command Language," is a summary of the shell command language, notation, and programming constructs, as dis­ cussed in Chapter 7, "Shell Tutorial." • Appendix F, "Setting Up the Terminal," explains how to configure your terminal for use with the UNIX system, and create multiple windows on the screens of terminals with windowing capability. • The Glossary defines terms pertaining to the UNIX system used in this book. PREFACE xiii Notation Conventions The following notation conventions are used throughout this Guide. bold User input, such as commands, options and argu­ ments to commands, variables, and the names of directories and files, appear in bold. italic Names of variables to which values must be assigned (such as password) appear in italic.
Recommended publications
  • At—At, Batch—Execute Commands at a Later Time
    at—at, batch—execute commands at a later time at [–csm] [–f script] [–qqueue] time [date] [+ increment] at –l [ job...] at –r job... batch at and batch read commands from standard input to be executed at a later time. at allows you to specify when the commands should be executed, while jobs queued with batch will execute when system load level permits. Executes commands read from stdin or a file at some later time. Unless redirected, the output is mailed to the user. Example A.1 1 at 6:30am Dec 12 < program 2 at noon tomorrow < program 3 at 1945 pm August 9 < program 4 at now + 3 hours < program 5 at 8:30am Jan 4 < program 6 at -r 83883555320.a EXPLANATION 1. At 6:30 in the morning on December 12th, start the job. 2. At noon tomorrow start the job. 3. At 7:45 in the evening on August 9th, start the job. 4. In three hours start the job. 5. At 8:30 in the morning of January 4th, start the job. 6. Removes previously scheduled job 83883555320.a. awk—pattern scanning and processing language awk [ –fprogram–file ] [ –Fc ] [ prog ] [ parameters ] [ filename...] awk scans each input filename for lines that match any of a set of patterns specified in prog. Example A.2 1 awk '{print $1, $2}' file 2 awk '/John/{print $3, $4}' file 3 awk -F: '{print $3}' /etc/passwd 4 date | awk '{print $6}' EXPLANATION 1. Prints the first two fields of file where fields are separated by whitespace. 2. Prints fields 3 and 4 if the pattern John is found.
    [Show full text]
  • The Price of Safety: Evaluating IOMMU Performance Preliminary Results
    The Price of Safety: Evaluating IOMMU Performance Preliminary Results Muli Ben-Yehuda [email protected] IBM Haifa Research Lab The Price of Safety: Evaluating IOMMU Performance, 2007 Spring Xen Summit – p.1/14 Table of Contents IOMMUs Preliminary Performance Results Optimizations and Trade-offs Conclusions The Price of Safety: Evaluating IOMMU Performance, 2007 Spring Xen Summit – p.2/14 IOMMUs IOMMU - IO Memory Management Unit Think MMU for IO devices - separate address spaces! IOMMUs enable virtual machines direct hardware access for PV and FV guests ... while protecting the rest of the system from mis-behaving or malicious virtual machines But at what cost? The Price of Safety: Evaluating IOMMU Performance, 2007 Spring Xen Summit – p.3/14 Setting the Stage Full results to appear at OLS ’07 Calgary (PCI-X) and Calgary (PCI-e) IOMMUs Linux and Xen implementations ... with some corroborating evidence from the DART IOMMU on PPC JS21 blades and the IBM Research Hypervisor Joint work with Jimi Xenidis, Michal Ostrowski, Karl Rister, Alexis Bruemmer and Leendert Van Doorn Utilizing IOMMUs for Virtualization in Linux and Xen, by by M. Ben-Yehuda, J. Mason, O. Krieger, J. Xenidis, L. Van Doorn, A. Mallick, J. Nakajima, and E. Wahlig, OLS ’06 The Price of Safety: Evaluating IOMMU Performance, 2007 Spring Xen Summit – p.4/14 On Comparisons What are we comparing against? not emulation not virtual IO (frontend / backend drivers) Direct hardware access without an IOMMU compared with direct hardware access with an IOMMU on the IO path The Price of Safety:
    [Show full text]
  • SYSTEM V RELEASE 4 Migration Guide
    - ATlaT UN/~ SYSTEM V RELEASE 4 Migration Guide UNIX Software Operation Copyright 1990,1989,1988,1987,1986,1985,1984,1983 AT&T All Rights Reserved Printed In USA Published by Prentice-Hall, Inc. A Division of Simon & Schuster Englewood Cliffs, New Jersey 07632 No part of this publication may be reproduced or transmitted in any form or by any means-graphic, electronic, electrical, mechanical, or chemical, including photocopying, recording in any medium, tap­ ing, by any computer or information storage and retrieval systems, etc., without prior permissions in writing from AT&T. IMPORTANT NOTE TO USERS While every effort has been made to ensure the accuracy of all information in this document, AT&T assumes no liability to any party for any loss or damage caused by errors or omissions or by state­ ments of any kind in this document, its updates, supplements, or special editions, whether such er­ rors are omissions or statements resulting from negligence, accident, or any other cause. AT&T furth­ er assumes no liability arising out of the application or use of any product or system described herein; nor any liability for incidental or consequential damages arising from the use of this docu­ ment. AT&T disclaims all warranties regarding the information contained herein, whether expressed, implied or statutory, including implied warranties of merchantability or fitness for a particular purpose. AT&T makes no representation that the interconnection of products in the manner described herein will not infringe on existing or future patent rights, nor do the descriptions contained herein imply the granting or license to make, use or sell equipment constructed in accordance with this description.
    [Show full text]
  • Marjn Norling November 2012
    Mar$n Norling November 2012 UNIX Lecture Goals • Goal 1: Know basic UNIX commands and their use from memory. • Goal 2: Know how to find informaon on more advanced UNIX commands and their use. • Goal 3: Understand the basics of regular expression paerns. • Goal 4: Know the basic loops and condi$onals for shell scrip$ng and understand how to use them. UNIX Schedule Thursday Friday 09.00-09.45 UNIX introduc$on 09.00-09.45 Bash Scrip$ng 10.00-10.45 UNIX basics 10.00-10.45 Tutorial: Bash scrip$ng 11.00-12.00 Redirects to regexp 11.00-12.00 Tips & Quesons 12.00-13.00 Lunch 12.00-13.00 Lunch 13.00-16.00 Tutorial: Basics 13.00-16.00 Tutorial: finishing up UNIX HISTORY UNIX History • 1969 – First Version of UNIX developed at Bell Labs by AT&T • 1975 – UNIX 6, the first to be widely available outside Bell Labs. The first “Berkeley So]ware Distribu$on” (BSD) is released. • 1989 – UNIX System V, the last tradi$onal UNIX version. • 1991 – Linus Torvalds begin developing Linux. “UNIX-like” • Today – UNIX itself, what’s now called “tradi$onal UNIX” is not used, except by enthusiasts. • There are many “UNIX-like” systems (also known as *nix or UN*X) that are similar to UNIX while not conforming to the Single UNIX Specificaon. • In fact, most operang systems today except windows are “UNIX like”. Single UNIX Specificaon (SUS) • Developed and maintained by the Aus$n Group, based on earlier work by the IEee and The Open Group.
    [Show full text]
  • Linux Performance Tools
    Linux Performance Tools Brendan Gregg Senior Performance Architect Performance Engineering Team [email protected] @brendangregg This Tutorial • A tour of many Linux performance tools – To show you what can be done – With guidance for how to do it • This includes objectives, discussion, live demos – See the video of this tutorial Observability Benchmarking Tuning Stac Tuning • Massive AWS EC2 Linux cloud – 10s of thousands of cloud instances • FreeBSD for content delivery – ~33% of US Internet traffic at night • Over 50M subscribers – Recently launched in ANZ • Use Linux server tools as needed – After cloud monitoring (Atlas, etc.) and instance monitoring (Vector) tools Agenda • Methodologies • Tools • Tool Types: – Observability – Benchmarking – Tuning – Static • Profiling • Tracing Methodologies Methodologies • Objectives: – Recognize the Streetlight Anti-Method – Perform the Workload Characterization Method – Perform the USE Method – Learn how to start with the questions, before using tools – Be aware of other methodologies My system is slow… DEMO & DISCUSSION Methodologies • There are dozens of performance tools for Linux – Packages: sysstat, procps, coreutils, … – Commercial products • Methodologies can provide guidance for choosing and using tools effectively • A starting point, a process, and an ending point An#-Methodologies • The lack of a deliberate methodology… Street Light An<-Method 1. Pick observability tools that are: – Familiar – Found on the Internet – Found at random 2. Run tools 3. Look for obvious issues Drunk Man An<-Method • Tune things at random until the problem goes away Blame Someone Else An<-Method 1. Find a system or environment component you are not responsible for 2. Hypothesize that the issue is with that component 3. Redirect the issue to the responsible team 4.
    [Show full text]
  • 10Gb TR-D 10GBAS B/S SFP+ Dxxxl-N00 E-LR/LW Bidi Opti 0
    TR-DXxxL-N00 Rev1.6 10Gb/s SFP+ BiDi Optical Tran sceiver TR-DXxxL-N00, 10Km SMF Application 10GBASE-LR/LW Bi-directional, LC connector Features 10Gb/sserialopticalinterfacecompliantto 802.3ae10GBASE-LR,singleLCconnector forbi-directionalapplication,over10km SMF Electrical interface compliant to SFF-8431 specifications 1270/1330nm DFB transmitter, PINphoto- detector,integratedWDM 2-wireinterfaceformanagement specificationscompliantwithSFF8472 Partnumber(0°Cto70°C): Applications – TR-DX12L-N00,1270TX/1330RX High speed storage area – TR-DX33L-N00,1330TX/1270RX networks Lineside,clientsideloopbackfunction; Computerclustercross-connect Advancedfirmwareallowcustomersystem Customhigh-speeddatapipes encryption information to be stored in transceiver ROHScompliant Figure11: Application in System InnoLight Technology Corp. Page1of13 TR-DXxxL-N00 Rev1.6 1. GENERAL DESCRIPTION This10GigabitSFP+BiDitransceiverisdesignedtotransmitandreceiveopticaldata oversinglemodeopticalfiberforlinklength20km. TheSFP+BiDimoduleelectricalinterfaceiscomplianttoSFIelectricalspecifications. Thetransmitterinputandreceiveroutputimpedanceis100Ohmsdifferential.Data linesareinternally AC coupled. The module provides differential termination and reduce differential to common mode conversion for quality signal termination and lowEMI.SFItypicallyoperatesover200mmofimprovedFR4materialoruptoabout 150mmofstandardFR4withoneconnector. Thetransmitterconverts10Gbit/sserialPECLorCMLelectricaldataintoserialoptical data compliant with the 10GBASE-LR standard. An open collector
    [Show full text]
  • System Analysis and Tuning Guide System Analysis and Tuning Guide SUSE Linux Enterprise Server 15 SP1
    SUSE Linux Enterprise Server 15 SP1 System Analysis and Tuning Guide System Analysis and Tuning Guide SUSE Linux Enterprise Server 15 SP1 An administrator's guide for problem detection, resolution and optimization. Find how to inspect and optimize your system by means of monitoring tools and how to eciently manage resources. Also contains an overview of common problems and solutions and of additional help and documentation resources. Publication Date: September 24, 2021 SUSE LLC 1800 South Novell Place Provo, UT 84606 USA https://documentation.suse.com Copyright © 2006– 2021 SUSE LLC and contributors. All rights reserved. Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.2 or (at your option) version 1.3; with the Invariant Section being this copyright notice and license. A copy of the license version 1.2 is included in the section entitled “GNU Free Documentation License”. For SUSE trademarks, see https://www.suse.com/company/legal/ . All other third-party trademarks are the property of their respective owners. Trademark symbols (®, ™ etc.) denote trademarks of SUSE and its aliates. Asterisks (*) denote third-party trademarks. All information found in this book has been compiled with utmost attention to detail. However, this does not guarantee complete accuracy. Neither SUSE LLC, its aliates, the authors nor the translators shall be held liable for possible errors or the consequences thereof. Contents About This Guide xii 1 Available Documentation xiii
    [Show full text]
  • Bash-Prompt-HOWTO.Pdf
    Bash Prompt HOWTO $Revision: 0.93 $, $Date: 2003/11/06 02:12:02 $ Giles Orr Copyright © 1998, 1999, 2000, 2001, 2003 Giles Orr Creating and controlling terminal and xterm prompts is discussed, including incorporating standard escape sequences to give username, current working directory, time, etc. Further suggestions are made on how to modify xterm title bars, use external functions to provide prompt information, and how to use ANSI colours. Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.1 or any later version published by the Free Software Foundation; with no Invariant Sections, with no Front−Cover Texts, and with no Back−Cover Texts. A copy of the license is included in the section entitled "GNU Free Documentation License". Bash Prompt HOWTO Table of Contents Chapter 1. Introduction and Administrivia.....................................................................................................1 1.1. Introduction.......................................................................................................................................1 1.2. Revision History...............................................................................................................................1 1.3. Requirements....................................................................................................................................1 1.4. How To Use This Document............................................................................................................2
    [Show full text]
  • UNIX System Services Z/OS Version 1 Release 7 Implementation
    Front cover UNIX System Services z/OS Version 1 Release 7 Implementation z/OS UNIX overview z/OS UNIX setup z/OS UNIX usage Paul Rogers Theodore Antoff Patrick Bruinsma Paul-Robert Hering Lutz Kühner Neil O’Connor Lívio Sousa ibm.com/redbooks International Technical Support Organization UNIX System Services z/OS Version 1 Release 7 Implementation March 2006 SG24-7035-01 Note: Before using this information and the product it supports, read the information in “Notices” on page xiii. Second Edition (March 2006) This edition applies to Version 1 Release 7 of z/OS (5637-A01), and Version 1, Release 7 of z/OS.e (5655-G52), and to all subsequent releases and modifications until otherwise indicated in new editions. © Copyright International Business Machines Corporation 2003, 2006. All rights reserved. Note to U.S. Government Users Restricted Rights -- Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp. Contents Notices . xiii Trademarks . xiv Preface . .xv The team that wrote this redbook. .xv Become a published author . xvi Comments welcome. xvii Chapter 1. UNIX overview. 1 1.1 UNIX fundamentals . 2 1.1.1 UNIX objectives . 2 1.1.2 What people like about UNIX . 2 1.1.3 What people don’t like about UNIX . 3 1.1.4 UNIX operating system . 3 1.1.5 UNIX file system . 4 1.1.6 Parameter files . 6 1.1.7 Daemons. 6 1.1.8 Accessing UNIX . 6 1.1.9 UNIX standards. 7 1.1.10 MVS and UNIX functional comparison . 8 1.2 z/OS UNIX System Services fundamentals .
    [Show full text]
  • BASH Programming − Introduction HOW−TO BASH Programming − Introduction HOW−TO
    BASH Programming − Introduction HOW−TO BASH Programming − Introduction HOW−TO Table of Contents BASH Programming − Introduction HOW−TO.............................................................................................1 by Mike G mikkey at dynamo.com.ar.....................................................................................................1 1.Introduction...........................................................................................................................................1 2.Very simple Scripts...............................................................................................................................1 3.All about redirection.............................................................................................................................1 4.Pipes......................................................................................................................................................1 5.Variables...............................................................................................................................................2 6.Conditionals..........................................................................................................................................2 7.Loops for, while and until.....................................................................................................................2 8.Functions...............................................................................................................................................2
    [Show full text]
  • Writing Shell Scripts Day(S) Ref : SHL OBJECTIVES Participants the UNIX Shell Is Both an Interactive Interface to the UNIX System and a Powerful Scripting Language
    Hands-on course , 3 Writing Shell Scripts day(s) Ref : SHL OBJECTIVES Participants The UNIX Shell is both an interactive interface to the UNIX system and a powerful scripting language. This UNIX/Linux administrator training session will present detailed functionalities to help you understanding shell programming. You will performing system acquire Shell programming skills in concrete domains like survey, task automatization, software installation, administration duties including file processing...). installation, maintenance and integration or developer of text processing software. 1) Overview of the UNIX Shell 4) Advanced Shell programming and the Korn Shell Pre-requisites 2) Interfacing UNIX with the interactive Shell 3) An introduction to Shell scripting 5) Other UNIX powerful scripting tools Basic UNIX/Linux skills. Knowledge of any programming language is added advantage. 1) Overview of the UNIX Shell - History of the UNIX Shell. UNIX fork/exec system calls. Next sessions - Arguments and environment of a UNIX program. - How the Shell reads the command line. - Differences between Bourne, Korn and Bourne Again Shells. 2) Interfacing UNIX with the interactive Shell - Starting an interactive Shell. Initialization of the Shell. - Line editing, vi and emacs Ksh modes. Line editing with Bash. - Name completion. Shell options and the set built-in. - Customizing the environment. The command search path. - Shell commands and scripts. - Sourcing Shell commands. Execution of a Shell script. UNIX execution of a Shell script, the she-bang. - Creation and use of Shell variables. Passing arguments to a Shell script. - Differences between exec, background and sub-shells. Using pipelines and lists. 3) An introduction to Shell scripting - Basic Shell programming.
    [Show full text]
  • Chapter 4 Introduction to UNIX Systems Programming
    Chapter 4 Introduction to UNIX Systems Programming 4.1 Introduction Last chapter covered how to use UNIX from from a shell program using UNIX commands. These commands are programs that are written in C that interact with the UNIX environment using functions called Systems Calls. This chapter covers this Systems Calls and how to use them inside a program. 4.2 What is an Operating System An Operating System is a program that sits between the hardware and the application programs. Like any other program it has a main() function and it is built like any other program with a compiler and a linker. However it is built with some special parameters so the starting address is the boot address where the CPU will jump to start the operating system when the system boots. Draft An operating system typically offers the following functionality: ● Multitasking The Operating System will allow multiple programs to run simultaneously in the same computer. The Operating System will schedule the programs in the multiple processors of the computer even when the number of running programs exceeds the number of processors or cores. ● Multiuser The Operating System will allow multiple users to use simultaneously in the same computer. ● File system © 2014 Gustavo Rodriguez-Rivera and Justin Ennen,Introduction to Systems Programming: a Hands-on Approach (V2014-10-27) (systemsprogrammingbook.com) It allows to store files in disk or other media. ● Networking It gives access to the local network and internet ● Window System It provides a Graphical User Interface ● Standard Programs It also includes programs such as file utilities, task manager, editors, compilers, web browser, etc.
    [Show full text]