Linux Shell Scripting Cookbook (3rd Edition) cover

Linux Shell Scripting Cookbook (3rd Edition)

Rating 3.9
Word count
320K words
Chapters
13
Series
Turing Programming Series · Linux/UNIX
ISBN
9787115477385

Tags

Summary

This is the Chinese translation of the third edition of Linux Shell Scripting Cookbook. Linux/GNU offers a stable, reliable, and powerful development environment, and the shell, as the native interface for communicating with the operating system, is the most flexible means of controlling how the entire system operates and interacting with Linux. The author starts with shell fundamentals, first introducing the usage of simple commands and various file operations, then gradually moves on to text processing, web interaction, backup and archiving, network configuration and troubleshooting, system monitoring and tuning, and more, covering beginner, intermediate, and advanced topics while passing on the techniques that seasoned script users rely on. The book is organized around concrete tasks, with 13 chapters and more than 100 recipes, and its examples are thorough and clear. The third edition has been fully revised to match the features of the latest Linux distributions of its time and adds roughly 100 pages of new content on repository management, network namespaces, dynamic invocation, system tuning, containers, and the cloud: Git and Fossil version control, tcpdump/ngrep/ip network troubleshooting, strace and ltrace tracing, dstat and sysctl performance tuning, and Docker containers, virtual machines, and cloud deployment. Whether you are an ordinary user who wants to organize photos or download audio and video, or a system administrator who wants to simplify work with containers and the cloud, you will find solutions you can apply directly.

Editor's review

市面上讲 shell 的书不少,但大多按语法体系“教语言”,这本书走的是另一条路:按“要解决什么问题”来给攻略。查文件、比文本、爬网页、做备份、搭 VPN、抓网络包、调内核参数、跑 Docker——每一条都是运维现场能直接抄的作业。第3版新增的仓储管理、网络分组、动态调用、系统调优与云端几章,让一本 2013 年就已成名的经典跟上了容器与云的时代。 需要提醒的是,它的长处是“案例库”而非“教科书”:前几章对零基础读者尚算友好,但整体并不追求由浅入深的系统铺陈,语法细节与原理讲解点到为止。所以更推荐的用法是把它当作案头手册,配合一本系统的 shell 教程一起读——入门靠教程,提速靠攻略。译者门佳长期翻译 Linux 与前端技术书,术语处理稳妥,命令行示例保留了原书风格,可以直接在终端里跑。

Who it's for

A good fit for

  • 已会用 Linux 基本命令、想进一步提升自动化和脚本能力的开发者
  • 需要编写运维脚本、处理批量任务的系统管理员与运维工程师
  • 习惯“照着案例改”而非从头读语法书的自学型读者
  • 想了解容器、虚拟机与云端部署基本操作的初中级技术人员

Not a good fit for

  • 完全没有 Linux 命令行基础、需要从零系统入门的新手
  • 期望获得深入 shell 语言规范和原理剖析的读者
  • 只想学 Python 等编程语言、对命令行工具没有需求的读者

Reading tips

  1. 先通读第1、2章确认命令与语法熟练度,其余章节按工作需要跳读,当作手册使用。
  2. 每读一则攻略就立刻在同一台 Linux 机器或容器里动手复现,把示例脚本改成自己的场景。
  3. 文本处理部分(grep/sed/awk)建议配合真实日志文件练习,效果远胜空跑示例。
  4. 读完新增的仓储管理与云端章节后,尝试用 Git 管理自己的脚本库,并打包成 Docker 镜像。

About the publisher

Posts & Telecom Press China · Founded in 1953

Posts & Telecom Press is known for its strengths in science and technology, computing, and information and communications titles, and has extended its publishing into photography, art, software learning, and inspirational growth, giving it a fairly diverse range. Its catalog includes computing and communications works such as Refactoring and Patterns (Revised Edition) and Huawei Switch Learning Guide (Second Edition), alongside bilingual collector's editions such as The Little Prince (Chinese-English-French illustrated collector's edition), The Great Gatsby, and Three Days to See. Beijing Ten Years: 1980-1990 and Ghost Blade: WLOP Personal Illustration Collection reflect its presence in photography and art. Its authors include Antoine de Saint-Exupéry, Helen Keller, Joshua Kerievsky, Wang Da, Zhang Zhaozeng, and WLOP.

Contents

  1. Chapter 1 Getting Started
  2. Chapter 2 The Joy of Commands
  3. Chapter 3 In the Name of the File
  4. Chapter 4 Let Text Fly
  5. Chapter 5 A Tangled Mess? No Such Thing!
  6. Chapter 6 Repository Management
  7. Chapter 7 Plan B
  8. Chapter 8 No Network, No Gain
  9. Chapter 9 Seeing Through Everything
  10. Chapter 10 The Burden of Management
  11. Chapter 11 Tracing the Evidence
  12. Chapter 12 System Tuning
  13. Chapter 13 In the Cloud

FAQ

这本书适合零基础学 shell 吗?
不太适合。本书按任务组织攻略,语法体系不够系统,零基础读者容易在细节处卡住。建议先用《Linux 命令行与 shell 脚本编程大全》一类教程打底,再用本书提速。
第3版和第2版差别大吗?
差别明显。第3版全面修订以适配新发行版,新增仓储管理、网络分组、动态调用、系统调优、容器与云等内容,篇幅比前版多约100页;若只为学基础和文本处理,旧版仍可用。
书中的示例能直接在新版发行版上运行吗?
绝大部分可以。作者说明攻略可运行在任何安装了 Linux 的机器上,从树莓派到大型机皆可;但个别命令输出格式或软件版本已变化,需按提示自行调整。
这本书和《Linux命令行与shell脚本编程大全》怎么选?
两者互补:大全偏系统教学,讲解语言与语法;本书偏实战攻略,聚焦具体任务解法。时间有限的话,入门选大全,已有基础想解决实际问题选本书。

Comments

Find this book

This site is an index: you start “Search all sources” in your browser, and the entries it lists all point to third-party sites; please judge their availability yourself.

Top rated in the same category