资源说明:contents Chapter 1: Getting Started 1 An Introduction to UNIX, Linux, and GNU 1 What Is UNIX? 1 What Is Linux? 3 The GNU Project and the Free Software Foundation 3 Linux Distributions 4 Programming Linux 4 Linux Programs 5 Text Editors 6 The C Compiler 7 Development System Roadmap 8 Getting Help 14 Summary 16 Chapter 2: Shell Programming 17 Why Program with a Shell? 18 A Bit of Philosophy 18 What Is a Shell? 19 Pipes and Redirection 21 Redirecting Output 21 Redirecting Input 22 Pipes 22 The Shell as a Programming Language 23 Interactive Programs 23 Creating a Script 24 Making a Script Executable 25 Shell Syntax 27 Variables 27 Conditions 31 Control Structures 34 Functions 46 Commands 49 Command Execution 68 Here Documents 73 Debugging Scripts 74 Going Graphical — The dialog Utility 75 Putting It All Together 81 Requirements 82 Design 82 Summary 91 Chapter 3: Working with Files 93 Linux File Structure 94 Directories 94 Files and Devices 95 System Calls and Device Drivers 96 Library Functions 97 Low-Level File Access 98 write 98 read 99 open 100 Initial Permissions 101 Other System Calls for Managing Files 106 The Standard I/O Library 109 fopen 110 fread 110 fwrite 111 fclose 111 fflush 111 fseek 112 fgetc, getc, and getchar 112 fputc, putc, and putchar 112 fgets and gets 113 Formatted Input and Output 113 printf, fprintf, and sprintf 113 scanf, fscanf, and sscanf 115 Other Stream Functions 117 Stream Errors 119 Streams and File Descriptors 119 File and Directory Maintenance 120 chmod 120 chown 120 unlink, link, and symlink 121 mkdir and rmdir 121 chdir and getcwd 122 Scanning Directories 122 opendir 123 readdir 123 telldir 123 seekdir 124 closedir 124 Errors 127 strerror 127 perror 127 The /proc File System 128 Advanced Topics: fcntl and mmap 132 fcntl 132 mmap 133 Summary 135 Chapter 4: The Linux Environment 137 Program Arguments 137 getopt 140 getopt_long 142 Environment Variables 144 Use of Environment Variables 146 The environ Variable 147 Time and Date 148 Temporary Files 156 User Information 158 Host Information 161 Logging 163 Resources and Limits 167 Summary 173 Chapter 5: Terminals 175 Reading from and Writing to the Terminal 175 Talking to the Terminal 180 The Terminal Driver and the General Terminal Interface 182 Overview 183 Hardware Model 183 The termios Structure 184 Input Modes 186 Output Modes 186 Control Modes 187 Local Modes 188 Special Control Characters 188 Terminal Speed 192 Additional Functions 192 Terminal Output 196 Terminal Type 197 Identify Your Terminal Type 197 Using terminfo Capabilities 200 Detecting Keystrokes 205 Virtual Consoles 207 Pseudo-Terminals 208 Summary 209 Chapter 6: Managing Text-Based Screens with curses 211 Compiling with curses 212 Curses Terminology and Concepts 213 The Screen 216 Output to the Screen 216 Reading from the Screen 217 Clearing the Screen 218 Moving the Cursor 218 Character Attributes 218 The Keyboard 221 Keyboard Modes 221 Keyboard Input 222 Windows 224 The WINDOW Structure 224 Generalized Functions 225 Moving and Updating a Window 225 Optimizing Screen Refreshes 229 Subwindows 230 The Keypad 232 Using Color 235 Redefining Colors 238 Pads 238 The CD Collection Application 240 Starting a New CD Collection Application 240 Looking at main 243 Building the Menu 243 Database File Manipulation 245 Querying the CD Database 250 Summary 254 .... .... Chapter 18: Standards for Linux 747 The C Programming Language 748 A Brief History Lesson 748 The GNU Compiler Collection 749 gcc Options 749 Interfaces and the Linux Standards Base 751 LSB Standard Libraries 752 LSB Users and Groups 754 LSB System Initialization 754 The Filesystem Hierarchy Standard 755 Further Reading about Standards 758 Summary 759
本源码包内暂不包含可直接显示的源代码文件,请下载源码包。