"Linux command line and Shell script Programming Daquan 2nd edition. Bloom" pdf

Source: Internet
Author: User
Tags html tags mysql client









: Network Disk Download











Content Introduction· · · · · ·


This book is a comprehensive tutorial on Linux command-line and shell script programming. The book is divided into four parts: the first part introduces the Linuxshell command line, the second part introduces the Shell Script Programming Foundation, the third part delves into the advanced content of shell script programming, and the Forth part describes how to use shell script in the real environment. This book covers not only detailed hands-on tutorials and practical information in the real world, but also reference and background information related to what you have learned.



The book is comprehensive, concise language, sample rich, suitable for Linux system administrators and Linux enthusiasts to read the reference.


about the author· · · · · ·


Richard Blum Systems and network administrators have been working in the IT industry for more than 22 years. He manages UNIX, Linux, Novell, and Microsoft servers, automates network monitoring with Linux shell scripts, and writes scripts in most common Linux shell environments. He is also a lecturer in online courses, and many universities and colleges across the United States use his basic Linux courses. In addition to this book, Richard also has professional Linux programming and other books.



Christine Bresnahan system Administrator, has been working in the IT industry for nearly 30 years. He is currently a part-time professor at the Ivy Tech Community College in Indianapolis, where he teaches courses on Linux system Management, Linux security, and Windows security.



Wuhai Linux Systems Engineers, interested in Gnu/linux and mobile-connected applications, are passionate about open source software. Worked for commercial Linux vendors, engaged in mobile device operating system integration and business Linux distribution integration.


CatalogueDirectory
The first part of the Linux command line
The 1th chapter of the first knowledge of Linux Shell 2
1.1 What is Linux 2
1.1.1 Deep Dive into Linux kernel 3
1.1.2 GNU Tool Chain 10
1.1.3 Linux Desktop Environment 11
1.2 Linux Release 16
1.2.1 Core Linux Release 16
1.2.2 Professional Linux distributions 17
1.2.3 Linux LiveCD 17
1.3 Summary 19
2nd Chapter into the Shell 20
2.1 Terminal emulation 20
2.1.1 Graphics features 21
2.1.2 Keyboard 24
2.2 Terminfo Database 25
2.3 Linux Console 28
2.4 Xterm Terminal 29
2.4.1 Command line parameter 30
2.4.2 xterm Main Menu 31
2.4.3 VT Options Menu 32
2.4.4 VT Font Menu 34
2.5 Konsole Terminal 36
2.5.1 Command line parameter 36
2.5.2 Tabbed Windows Session 37
2.5.3 configuration File 38
2.5.4 Menu Bar 39
2.6 GNOME Terminal 43
2.6.1 command line parameter 43
2.6.2 Label 43
2.6.3 Menu Bar 44
2.7 Summary 47
3rd Chapter Basic Bash Shell command 48
3.1 Starting the Shell 48
3.2 Shell Prompt 49
3.3 Bash Handbook 51
3.4 Navigating the file system 52
3.4.1 Linux File System 52
3.4.2 Traversing the Directory 54
3.5 List of files and directories 56
3.5.1 Basic List Function 56
3.5.2 Modifying output Information 57
3.5.3 complete list of parameters 58
3.5.4 Filter Output List 60
3.6 Working with files 61
3.6.1 Creating a File 61
3.6.2 Copying Files 61
3.6.3 Link Files 63
3.6.4 Renaming a file 65
3.6.5 Deleting files 65
3.7 Working with Catalogs 67
3.7.1 Creating a directory 67
3.7.2 Deleting a directory 67
3.8 Viewing the contents of a file 68
3.8.1 Viewing file Statistics 68
3.8.2 Viewing file Types 69
3.8.3 viewing the entire file 69
3.8.4 Viewing some files 72
3.9 Summary 73
4th. More Bash Shell commands 75
4.1 Monitoring Procedures 75
4.1.1 Probing Process 75
4.1.2 Real-time monitoring process 82
4.1.3 End Process 84
4.2 Monitoring disk space 85
4.2.1 Mounting Storage Media 86
4.2.2 using the DF command 89
4.2.3 using the du command 89
4.3 Working with data files 90
4.3.1 Sort Data 91
4.3.2 Search Data 94
4.3.3 Compressing data 96
4.3.4 Archive Data 99
4.4 Summary 100
5th. Using Linux Environment Variables 101
5.1 What is an environment variable 101
5.1.1 Global environment variable 102
5.1.2 Local Environment Variables 103
5.2 Setting Environment Variables 106
5.2.1 setting Local Environment variables 106
5.2.2 setting Global Environment Variables 107
5.3 Deleting environment Variables 107
5.4 Default shell environment variable 108
5.5 Setting the PATH environment variable 111
5.6 Positioning System Environment Variables 112
5.6.1 Login Shell 112
5.6.2 Interactive Shell 116
5.6.3 non-interactive shell 118
5.7 Variable Array 118
5.8 Using command aliases 119
5.9 Summary 120
6th. Understanding Linux File Permissions 122
6.1 Linux Security 122
6.1.1/ETC/PASSWD File 122
6.1.2/etc/shadow file 124
6.1.3 Adding a new user 125
6.1.4 Deleting a user 127
6.1.5 Modifying users 128
6.2 Using the Linux Group 130
6.2.1/etc/group file 131
6.2.2 Creating a new group 131
6.2.3 Modifying groups 132
6.3 Understanding File Permissions 133
6.3.1 using the file permission character 133
6.3.2 Default File Permissions 134
6.4 Changing security Settings 136
6.4.1 Changing Permissions 136
6.4.2 Changing affiliation 137
6.5 Sharing Files 138
6.6 Summary 139
7th. Managing the File System 141
7.1 Exploring Linux file Systems 141
7.1.1 Basic Linux File System 141
7.1.2 Log File System 142
7.1.3 Extended Linux log file system 143
7.2 Operating the file system 145
7.2.1 Creating a Partition 145
7.2.2 Creating a file system 147
7.2.3 if something goes wrong 149
7.3 Logical Volume Manager 150
7.3.1 Logical Volume Management layout 150
7.3.2 LVM in Linux 151
7.3.3 using Linux LVM 153
7.4 Summary 157
8th Installation software program 158
8.1 Package Management Basics 158
8.2 Debian-based Systems 159
8.2.1 Management package with aptitude 159
8.2.2 Installing the package with aptitude 161
8.2.3 Update software with aptitude 163
8.2.4 uninstalling software with aptitude 164
8.2.5 Aptitude Library 164
8.3 Red Hat-based systems 166
8.3.1 List Installed packages 166
8.3.2 installing software with Yum 167
8.3.3 Update software with Yum 168
8.3.4 uninstalling software with Yum 169
8.3.5 Handling Corrupted Package dependencies 169
8.3.6 Yum Software Library 171
8.4 Installing from Source 172
8.5 Summary 174
9th Chapter 176 using the editor
9.1 Vim Editor 176
9.1.1 Vim Basics 176
9.1.2 Editing Data 178
9.1.3 Copy and Paste 179
9.1.4 Find and replace 180
9.2 Emacs Editor 180
9.2.1 using Emacs 180 on the console
9.2.2 using Emacs 185 in X Window
9.3 KDE System Editor 186
9.3.1 KWrite Editor 186
9.3.2 Kate Editor 190
9.4 Gnome Editor 192
9.4.1 Start Gedit 192
9.4.2 Basic Gedit function 193
9.4.3 Setting Preferences 194
9.5 Summary 196
Part Two basics of shell scripting programming
The 10th chapter constructs the basic Script 200
10.1 Using multiple Commands 200
10.2 Creating a Shell script file 201
10.3 Displaying Messages 202
10.4 Using Variables 203
10.4.1 Environment Variables 204
10.4.2 User Variables 205
10.4.3 Anti-Quote 206
10.5 Redirecting inputs and outputs 207
10.5.1 Output Redirection 208
10.5.2 Input REDIRECT 208
10.6 Pipe 209
10.7 Performing mathematical Operations 212
10.7.1 Expr Command 212
10.7.2 using square brackets 214
10.7.3 floating Point Solution 215
10.8 Exit Script 218
10.8.1 View exit status code 218
10.8.2 Exit Command 219
10.9 Summary 221
Chapter 11th using structured commands 222
11.1 Using the If-then statement 222
11.2 If-then-else Statement 224
11.3 Nesting if 225
11.4 Test Command 226
11.4.1 Numerical comparison 227
11.4.2 string Comparison 228
11.4.3 File Comparison 232
11.5 Compound Condition Test 239
Advanced features of 11.6 if-then 240
11.6.1 using double angle brackets 240
11.6.2 using both brackets 241
11.7 Case Command 242
11.8 Summary 243
12th. More Structured Commands 245
12.1 for Command 245
12.1.1 reading a value from a list 246
12.1.2 reading a complex value from a list 247
12.1.3 reading a list from a variable 248
12.1.4 reading a value from a command 249
12.1.5 Changing the field separator 250
12.1.6 reading a directory with wildcards 251
12.2 C language style for command 253
12.2.1 C language for command 253
12.2.2 Using multiple Variables 255
12.3 while command 255
Basic format for 12.3.1 while 255
12.3.2 using multiple test commands 256
12.4 until command 258
12.5 Nested Loops 259
12.6 Loop processing File Data 261
12.7 Control Cycle 262
12.7.1 Break Command 262
12.7.2 Continue command 265
12.8 processing the output of the Loop 267
12.9 Summary 269
The 13th chapter deals with user input 270
13.1 command-line parameters 270
13.1.1 Reading Parameters 270
13.1.2 Read Program name 272
13.1.3 Test Parameters 274
13.2 Special Parameter Variables 274
13.2.1 parameter Count 274
13.2.2 fetching all the data 276
13.3 Moving a variable 277
13.4 Processing Options 278
13.4.1 Find Options 279
13.4.2 using the getopt command 282
13.4.3 using the more advanced getopts 284
13.5 Standardizing options 286
13.6 getting user input 287
13.6.1 Basic Reading 287
13.6.2 Timeout 289
13.6.3 Hidden mode Read 290
13.6.4 reading from a file 290
13.7 Summary 291
The 14th chapter presents data 293
14.1 Understanding inputs and outputs 293
14.1.1 Standard File Descriptor 293
14.1.2 REDIRECT Error 295
14.2 redirect output in script 297
14.2.1 Temporary REDIRECT 297
14.2.2 Permanent REDIRECT 298
14.3 redirect Input in Script 299
14.4 Creating your own redirect 299
14.4.1 creating the output file descriptor 300
14.4.2 redirect File descriptor 300
14.4.3 Creating an input file Descriptor 301
14.4.4 creating read-write file descriptors 302
14.4.5 Closing file Descriptors 303
14.5 Listing Open File descriptors 304
14.6 Block command output 305
14.7 Creating a temporary file 306
14.7.1 creating a local temporary file 306
14.7.2 creating temporary files in the/TMP directory 308
14.7.3 Creating a temp directory 308
14.8 Logging Messages 309
14.9 Summary 310
15th Control Script 312
15.1 Processing Signal 312
15.1.1 Replay Linux Signals 312
15.1.2 Generating Signal 313
15.1.3 Capture Signal 314
15.1.4 capturing a script exit 315
15.1.5 removing snaps 316
15.2 running scripts in the next mode 317
15.2.1 running scripts in the background 317
15.2.2 running multiple background jobs 318
15.2.3 Exit Terminal 319
15.3 Run script under non-console 319
15.4 Job Control 320
15.4.1 Viewing Jobs 320
15.4.2 restarting a stopped job 322
15.5 Adjust the degree of humility 323
15.5.1 Nice Command 323
15.5.2 renice Command 324
15.6 running the job at timed 324
15.6.1 using the AT command to schedule the execution of a job 325
15.6.2 plan to execute scripts regularly 328
15.7 Running at startup 330
15.7.1 running script at boot 330
15.7.2 launch in new shell 332
15.8 Summary 333
Part III Advanced Shell scripting programming
16th. Creating a function 336
16.1 Basic Scripting Functions 336
16.1.1 Creating a function 337
16.1.2 using Functions 337
16.2 return value 339
16.2.1 Default exit Status code 339
16.2.2 using the return command 340
16.2.3 using function Output 341
16.3 using a variable in a function 342
16.3.1 passing a parameter 342 to a function
16.3.2 working with variables in a function 344
16.4 array variables and functions 346
16.4.1 to function array parameter 346
16.4.2 returning an array from a function 348
16.5 function Recursion 349
16.6 Creating a library 350
16.7 using functions on the command line 351
16.7.1 Creating a function on the command line 352
16.7.2 defining functions in. bashrc Files 352
16.8 Summary 354
17th script programming on a graphical desktop 355
17.1 Creating a Text menu 355
17.1.1 Creating a menu layout 356
17.1.2 Creating a menu function 356
17.1.3 Adding a menu logic 357
17.1.4 Integrated shell Script Menu 358
17.1.5 using the Select command 359
17.2.1 Dialog Pack 361
17.2.2 Dialog Option 366
17.2.3 using the dialog command in a script 368
17.3 using Graphics 369
17.3.1 KDE Environment 369
17.3.2 GNOME Environment 372
17.4 Summary 376
The 18th chapter of the first gawk sed and the 377
18.1 Text Processing 377
18.1.1 SED Editor 377
18.1.2 Gawk Program 380
18.2 SED Editor Basics 385
18.2.1 more options for replacement 385
18.2.2 using address 387
18.2.3 Deleting rows 389
18.2.4 inserting and attaching text 391
18.2.5 Modifying line 392
18.2.6 Conversion Command 393
18.2.7 Review Print 394
18.2.8 working with SED and documents 396
18.3 Summary 398
19th Regular expression 399
19.1 What is a regular expression 399
19.1.1 definition 399
19.1.2 type of regular expression 400
19.2 Defining BRE Mode 401
19.2.1 Plain Text 401
19.2.2 Special Characters 402
19.2.3 Anchor Character 403
19.2.4-point character 405
19.2.5 Character Set 405
19.2.6 excluding character groups 407
19.2.7 Use Zone 408
19.2.8 Special Character Group 409
19.2.9 Asterisk 409
19.3 Extending Regular Expressions 411
19.3.1 question Mark 411
19.3.2 Plus 412
19.3.3 using curly braces 412
19.3.4 pipe Symbol 413
19.3.5 Aggregation Expression 414
19.4 Regular Expressions in practice 414
19.4.1 Directory file Count 415
19.4.2 Verify phone number 416
19.4.3 parsing e-mail address 417
19.5 Summary 419
20th SED Advanced 420
20.1 Multi-line command 420
20.1.1 Next Command 421
20.1.2 Multi-line Delete command 424
20.1.3 Multi-line Print command 424
20.2 Holding Space 425
20.3 Exclude Commands 426
20.4 Change Flow 428
20.4.1 Jump 429
20.4.2 Test 430
20.5 Mode override 431
20.5.1 and Symbol 431
20.5.2 replacing a single word 432
20.6 using sed 433 in scripts
20.6.1 using wrapper scripts 433
20.6.2 redirecting the output of SED 434
20.7 Creating the SED utility 434
20.7.1 Doubling line spacing 434
20.7.2 double line spacing for files that may contain blank lines 435
20.7.3 number of lines in a file 436
20.7.4 Print End Line 437
20.7.5 Deleting Rows 437
20.7.6 Deleting HTML tags 439
20.8 Summary 441
21st Chapter Gawk Advanced 442
21.1 Using Variables 442
21.1.1 built-in variables 442
21.1.2 Custom Variables 447
21.2 Working with arrays 449
21.2.1 defining an array variable 449
21.2.2 times the enumeration group variable 450
21.2.3 Deleting an array variable 451
21.3 Usage Mode 451
21.3.1 Regular Expression 451
21.3.2 matching operator 452
21.3.3 Mathematical Expressions 452
21.4 Structured Commands 453
21.4.1 If statement 453
21.4.2 While Statement 455
21.4.3 Do-while Statement 456
21.4.4 for statement 457
21.5 Format Printing 457
21.6 built-in functions 460
21.6.1 Mathematical Function 460
21.6.2 String Function 461
21.6.3 Time Function 463
21.7 Custom Functions 463
21.7.1 Defining a function 463
21.7.2 using Custom Functions 464
21.7.3 Creating a function library 464
21.8 Summary 465
22nd use other shell 467
22.1 What is dash shell 467
22.2 Dash Shell features 468
22.2.1 Dash Command line parameter 468
22.2.2 Dash environment variable 469
22.2.3 Dash built-in command 471
22.3 Dash Script Programming 472
22.3.1 Creating a Dash script 473
22.3.2 features that cannot be used 473
22.4 Zsh Shell 477
22.5 zsh Shell Composition 478
22.5.1 Shell Option 478
22.5.2 built-in commands 480
22.6 zsh Script Programming 485
22.6.1 Mathematical Operations 485
22.6.2 Structured Commands 487
22.6.3 function 487
22.7 Summary 489
Part IV advanced Shell scripting programming topics
23rd use of the database 492
23.1 MySQL Database 492
23.1.1 installing MySQL 492
23.1.2 MySQL Client interface 494
23.1.3 creating a MySQL database object 498
23.2 PostgreSQL Database 500
23.2.1 Installing PostgreSQL 501
23.2.2 PostgreSQL Command Line interface 501
23.2.3 Creating a PostgreSQL database object 503
23.3 Using Data Sheet 505
23.3.1 Creating a data table 505
23.3.2 inserting and deleting data 507
23.3.3 Querying Data 508
23.4 using databases in scripts 509
23.4.1 connecting to a database 509
23.4.2 sending commands to the server 511
23.4.3 Formatting Data 514
23.5 Summary 516
Chapter 24th using Web 517
24.1 Lynx Program 517
24.1.1 Installing Lynx 518
24.1.2 Lynx Command Line 518
24.1.3 Lynx configuration File 523
24.1.4 Lynx environment variable 524
24.1.5 fetching data from Lynx 524
24.2 Curl Program 527
24.2.1 Installing Curl 527
24.2.2 Explore Curl 527
24.3 using ZSH to process the network 528
24.3.1 TCP Module 528
24.3.2 client/server mode 529
24.3.3 using zsh for C/s programming 530
24.4 Summary 533
The 25th Chapter uses e-mail 534
25.1 Linux e-Mail Basics 534
25.1.1 e-mail in Linux 534
25.1.2 Mail Delivery Agent 535
25.1.3 Mail Delivery Agent 536
25.1.4 Mail User Agent 537
25.2 setting up a server 540
25.2.1 SendMail 541
25.2.2 Postfix 543
25.3 sending messages using MAILX 545
25.4 Mutt Program 548
25.4.1 Mounting Mutt 548
25.4.2 Mutt Command Line 548
25.4.3 using Mutt 549
25.5 Summary 551
26th. Scripting Utility 552
26.1 Monitoring disk space 552
Features required by 26.1.1 552
26.1.2 creating a script 555
26.1.3 Running script 556
26.2 Making a backup 557
26.3 Managing user Accounts 563
Features required by 26.3.1 563
26.3.2 Creating a script 569
26.4 Summary 575
27th Shell Script Programming Advanced 576
27.1 Monitoring System Statistical data 576
27.1.1 System Snapshot Report 576
27.1.2 System Statistics Report 582
27.2 Issue Tracking Database 589
27.2.1 Creating a database 589
27.2.2 Record Issues 591
27.2.3 Update Issue 594
27.2.4 Finding problems 599
27.3 Summary 602
Appendix A Bash Command quick guide 604
Appendix B sed and gawk quick Guide 611











: Network Disk Download



"Linux command line and Shell script Programming Daquan 2nd edition. Bloom" pdf


Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.