Since early 1970, Unix operating system has gone through many metamorphosis. As of now many variants of Unix systems are available and some of them are commercial and where as the others are freely available. In the recent years, Linux, a public domain, freely available Unix variant has attracted the people very much. Till today, Unix is believed to be bread and butter of Computer Science intern’s. However, because of this freely available Unix variant, in recent years, many people are becoming Unix enthusiasts; and this is very much true especially in India.
Hundreds of books had been written in the past which explores various facets of Unix such as user commands, shell programming. However, there are very few books which details This book is an attempt to explain Unix system facilities in a lucid and problem oriented manner. The examples which are discussed are araised from the author’s lectures at RITCH center and also from the susggestions (answers) made by thousands of Unix enthusiasts in USENET groups on Unix, and personnel web pages of many Linux enthusiasts. Also, this book deals with another popular operating system Windows (especially NT and 2000) and its facilities in operating system point of view.
This book assumes that the prosperous reader has no hands on exposure to Unix Operating System. But, assumes has worked on atleast some other operating system such as windows or DOS.
First chapter explains about general aspect of operating system and its services. Subsequent 10 chapters deal with “how to get hands on exposure to Unix Operating System”. Chapter 12 explains Windows NT operating system in detail. Chapter 13 explains about programming tools under Unix environment such as compiling, linking, multi file programming.
Numerous examples are included to aid students to test their skills in Unix in Appendix. Numerous questions answers are included at the Windows NT chapter also. Also, some questions marked with * are not provided with answers. Readers are requested solve them on their own to improve their skills.
Contents Chapter 1 1.Introduction to Unix system 1 1. 1 Simple View of An OS 1 1.1. 1 Kernel 2 1.1. 2 Distinguished Applications 3 1.1. 3 Command Interpreter 4 1.1. 4 Differences between DOS and Unix 5 1. 2 Introduction to Unix File System 5 1.2. 1 File and Directory Naming 6 1.2. 2 Unix File System Architecture 7 1. 3 Manual Pages 10 1. 4 The First command ‘cat’ 11 1. 5 Command History 12 1. 6 Conclusions 13 Chapter 2 2.vi editor 14 Chapter 3 3. Redirection Operators 16 3 1 Introduction 16 3.1. 1 Standard Input, output redirection operators 16 3.1. 2 The >> and << operators 18 3.2 Some Useful Commands 19 3.2. 1 more command 19 3.2. 2 pg command 20 3.2. 3 nl command 20 3.2. 4 tail command 20 3.2. 5 head command 20 3.2. 6 mkdir command 20 3.2. 7 rmdir command 21 3.2. 8 pwd command 21 3.2. 9 cd command 21 3.2. 10 ls command 21 3.2. 11 cp command 23 3.2. 12 mv command 23 3.2. 13 wc command 24 3.2. 14 find command 24 3.2. 15 Link Files 25 3.2. 16 Wildcards 26 3.2. 17 Printing 27 Chapter 4 4.Filters 28 4.1 Introduction 28 4.1. 1 uniq command 28 4.1. 2 grep command 28 4.1. 3 fgrep and egrep 30 4.1. 4 cut command 30 4.1. 5 paste command 31 4.1. 6 join command 32 4.1. 7 tr command 34 4.1. 8 df command 34 4.1. 9 du command 35 4.1. 10 who command 35 4.1. 11 w command 35 4.1. 12 rm command 35 4.1. 13 unlink command 36 4.1. 14 ulimit command 37 4.1. 15 chmod command 37 4.1. 16 umask command 41 4.1. 17 chown command 42 4.1. 18 chgrp command 42 4.1. 19 diff command 42 4.1. 20 SW patching 43 4.1. 21 cmp command 43 4.1. 22 comm command 43 Chapter 5 5.Pipes 44 5.1 Introduction to Pipes 44 5.2 The tee command 44 5.3 Some other means of joining commands 45 Chapter 6 6.Awk Command 46 Chapter 7 7.Backup Commands 54 7.1 Introduction 54 7.1.1 tar command 54 7.1.2 cpio command 55 7.1.3 zip and unzip commands 55 7.1.4 mount and umount commands 56 Chapter 8 8.Processes in Unix 57 8.1 Introduction 57 8.2 Users Processes 63 8.2.1 Background and Foreground Processes 66 8.2.2 at command 68 8.2.3 time command 69 Chapter 9 9. Terminal Handling 70 Chapter 10 10. Internet Related Commands 74 10.1 finger command 74 10.2 rlogin command 74 10.3 telnet command 75 10.4 ftp command 75 10.5 arp command 75 Chapter 11 11.Shell Programming 77 11.1 Introduction to Shell Programming 77 11.1.1 Invoking Script 78 11.1.2 Shell Variables 79 11.1.3 Environment Variables 80 11.1.4 Positional Variables 82 11.2 Programming Consructs 83 11.2.1 if-then-else-fi 83 11.2.2 case construct 86 11.2.3 while loop 87 11.2.4 until loop 90 11.2.5 for loop 92 11.2.6 Arrays 101 Chapter 12 12.Windows NT 103 12.1 Comparing Unix and Windows NT 103 12.2 NT server Capabilities 114 12.2.1 Notable Characteristics of Windows NT 117 12.3 NT Server Architecture 117 12.3.1 The Hardware Abstraction Layer(HAL) 117 12.3.2 The NT Kernel 118 12.3.3 The NT Executive 118 12.3.4 The SW Sub-systems 121 12.4 Windows Tools 123 12.5 Administering Disks, Volume Sets and RAID arrays 130 12.6 Windows NT File Backup 141 12.6.1 ntbackup operation 142 12.7 Remote Access Services and Applications 146 12.8 Windows NT File System 148 12.9 Conclusions 158 Chapter 13 13.Compiling C and C++ Programs under Unix 163 13.1 Introduction to C Compiler 163 13.1.1 Understanding of Compilation Steps 163 13.2 Detailed Analysis of Compilation Process 164 13.2. 1 Running the Resulting Program 164 13.2. 2 The Pre-Processor 165 13.2. 3 The Assembler 174 13.2. 4 Creating Object Files but not linking 175 13.2. 5 Creating Debug Ready Code 176 13.2. 6 Creating Optimized Code 176 13.2. 7 Creating Extra Compiler Warnings 177 13.2. 8 Linking Libraries 178 13.2. 9 Specifying Include directories along the command line 178 13.2. 10 The linker 178 13.2. 11 Size command 178 13.2. 12 The strip command 181 13.2. 13 The as command 181 13.2. 14 The ldd command 181 13.2. 15 Dynamic Executable and Static Executable 182 13.2. 16 Indent Command 182 13.2. 17 splint command 182 13.3 Compiling a multi source “c” programs 184 13.4 Compiling a single source “c++” program 185 13.5 Conclusions 185 14. References 186 15. Appendix: Some More Examples of Unix Explained 187 16. Previous Years Question Papers 246 Index 255