摘要: 几个命名的类提供了常用类的便捷方式。命名的类以 [: 开头,以 :] 结尾。包括: [:alnum:] 字母数字字符 [:blank:] 空白和制表符字符 [:digit:] 数字 0 到 9(相当于 0-9) [:upper:] 和 [:lower:] 分别表示大写和小写字母 ^(取反) 如果作为方括号中的第一个字符使用,^(脱字符)就对其余字符的意义取反,所以只匹配 不在... 阅读全文
posted @ 2008-08-18 20:11 xiaoyixy 阅读(242) 评论(0) 推荐(0) 编辑
摘要: 等待 stdin [ian@echidna ian]$ (date; cat - >bginput.txt; date)& [1] 18648 [ian@echidna ian]$ Fri Nov 11 00:03:28 EST 2005 ... 阅读全文
posted @ 2008-08-18 19:34 xiaoyixy 阅读(296) 评论(0) 推荐(0) 编辑
摘要: 带 noclobber 选项的输出重定向 [ian@echidna lpi103]$ set -o noclobber [ian@echidna lpi103]$ ls x* z* >stdout.txt 2>stderr.txt -bash: stdout.txt: cannot o... 阅读全文
posted @ 2008-08-18 18:32 xiaoyixy 阅读(306) 评论(0) 推荐(0) 编辑
摘要: 用 touch 设置 mtime [ian@echidna lpi103]$ touch -t 200511051510.59 f3 [ian@echidna lpi103]$ touch -d 11am f4 [ian@echidna lpi103]$ touch -d "last ... 阅读全文
posted @ 2008-08-18 17:30 xiaoyixy 阅读(193) 评论(0) 推荐(0) 编辑
摘要: cat、tac、od 和 split cat:显示文件 tac:与cat相反的顺序显示一个文件 od:转储 split:文件分割 wc、head 和 tail 使用 expand 和 unexpand [ian@echidna lpi103]$ expand -t 1 te... 阅读全文
posted @ 2008-08-18 15:36 xiaoyixy 阅读(192) 评论(0) 推荐(0) 编辑
摘要: bash shell 是大多数 Linux 发行版上的默认 shell。如果不是运行在 bash shell 之下,那么可以考虑用以下方式之一对 bash shell 进行实践。 使用 chsh -s /bin/bash 命令来改变默认 shell。这一修改将在下一次登录时生效。 使用 su - $USER -s /bin/b... 阅读全文
posted @ 2008-08-18 12:50 xiaoyixy 阅读(433) 评论(0) 推荐(0) 编辑