摘要: 分享一些可能你不知道的shell用法和脚本,简单&强大!在阅读以下部分前,强烈建议读者打开一个shell实验,这些都不是shell教科书里的大路货哦:)!$!$是一个特殊的环境变量,它代表了上一个命令的最后一个字符串。如:你可能会这样:$mkdir mydir$mv mydir yourdir$cd yourdir可以改成:$mkdir mydir$mv !$ yourdir$cd !$sudo !!以root的身份执行上一条命令 。场景举例:比如Ubuntu里用apt-get安装软件包的时候是需要root身份的,我们经常会忘记在apt-get前加sudo。每次不得不加上sudo再重新 阅读全文
posted @ 2012-11-24 14:09 李现民 阅读(4032) 评论(0) 推荐(1) 编辑
摘要: Bash, which is the default shell in Linux contains a whole lot of key bindings which makes it really easy to use . The most commonly used shortcuts are listed below :CTRL Key BoundCtrl + a- Jump to the start of the lineCtrl + b- Move back a charCtrl + c- Terminate the commandCtrl + d- Delete from un 阅读全文
posted @ 2012-11-24 14:07 李现民 阅读(345) 评论(0) 推荐(0) 编辑