疑难排解 As our scripts become more complex, it’s time to take a look at what happens when things go wrong and they don’t do what we want. In this chapter, we’ll look at some of the ...
ls 的乐趣 选项和参数 深入研究长格式输出 确定文件类型 用 less 浏览文件内容 less 就是 more(禅语:色即是空) 旅行指南 符号链接 硬链接 拓展阅读 Now that we know how to move around the file system, it’s time for a guided tour of ...
流程控制:if 分支结构 In the last chapter, we were presented with a problem. How can we make our report generator script adapt to the privileges of the user running the script? The soluti...
查找文件 locate - 查找文件的简单方法 find - 查找文件的复杂方式 Tests 操作符 预定义的操作 用户定义的行为 提高效率 xargs 返回操练场 选项 拓展阅读 查找文件 As we have wandered around our Linux system, one thing has become abu...
(字符)展开 路径名展开 波浪线展开 算术表达式展开 花括号展开 参数展开 命令替换 引用 双引号 单引号 转义字符 总结归纳 拓展阅读 In this chapter we are going to look at some of the “magic” that occurs on the command line when ...
通配符 mkdir - 创建目录 cp - 复制文件和目录 mv - 移动和重命名文件 rm - 删除文件和目录 ln — 创建链接 硬链接 符号链接 创建游戏场(实战演习) 创建目录 移动和重命名文件 创建硬链接 创建符号链接 移动文件和目录 总结 At this point, we are ready for some r...
数组 In the last chapter, we looked at how the shell can manipulate strings and numbers. The data types we have looked at so far are known in computer science circles as scalar var...