删除文件中的空行
grep . oldfile >newfile grep -v "^$" oldfile >newfile
压缩字符串里的空格
tr -s " " " " strings
scp小用:
scp也可以在本地机器中当成cp用,如:
cp file1 file2
scp file1 file2
当然scp主要是用户网络传输的
scp tem.pdf username@remotemachine:
注意:“:”,同志们可以想象下没有冒号会怎么样
充分利用alias吧
比如说:cd3 cd4
alias cd3='cd ../..' alias cd4='cd ../../..'
用组合键对付长命令行
ctrl+a 行首 ctrl+e 行尾 ctrl+u 光标前 ctrl+k 光标后 ESC+.调出上次你的命令所使用的参数 Ctrl+R 搜索
用fc命令将上次执行过的命令放到编辑器中执行
当然也可以用Ctrl+x和Ctrl+e来执行
正用着vim了却想起来某个命令没有执行怎么办
Solution1: 执行:!命令 Solution2: Ctrl+z先挂起来,回来运行玩了命令再玩你
快速的给文件改后缀
rename html htm *.html
发表在《
发表在《
发表在《
alias果然是与映射分不开,shell里面映射指令,apache里面映射全局路径
[回复]
freetstar
回复:
一月 8th, 2011 at 6:49 下午
@Mucid, 哈哈,第一反应没明白的你的意思..alias强大
[回复]
Mucid
回复:
一月 8th, 2011 at 7:21 下午
@freetstar, 我一向都神昏颠倒的
[回复]
诶,你那个显示代码用的是啥插件》很不错的样子。
我的博客ip被墙了,悲
[回复]
freetstar
回复:
一月 7th, 2011 at 11:21 下午
@婉秋, syshilight什么的…具体插件名一直没记下来
现在ip还没恢复吗?我去看看
[回复]
freetstar
回复:
一月 7th, 2011 at 11:21 下午
@婉秋, 貌似还真被墙了…
[回复]
婉秋
回复:
一月 7th, 2011 at 11:26 下午
@freetstar, 实在不行我就要转移了,估计会去Godaddy上找了,不知有什么更好地推荐没有
[回复]
Mucid
回复:
一月 8th, 2011 at 6:36 下午
@婉秋, 美女,像哥一样买VPS吧!
[回复]
婉秋
回复:
一月 8th, 2011 at 7:41 下午
@Mucid, 太贵了……比Godaddy的虚拟主机贵好多
[回复]
Mucid
回复:
一月 8th, 2011 at 8:00 下午
@婉秋, 把呢滴那堆computer卖了,换vps。
貌似我听说么人家里电脑很多啊
[回复]
婉秋
回复:
一月 7th, 2011 at 11:29 下午
@freetstar, 刚刚看了下godaddy太贵,悲剧了
[回复]
freetstar
回复:
一月 7th, 2011 at 11:42 下午
@婉秋, 貌似最近godaddy有优惠码的…
我去给你找找:gdz138n
[回复]
Mucid
回复:
一月 8th, 2011 at 6:38 下午
@freetstar, 其实free哥也杯具,早进入我的autoproxy列表了……
[回复]
freetstar
回复:
一月 8th, 2011 at 6:50 下午
@Mucid, 我还是低调路过吧
[回复]
Mucid
回复:
一月 8th, 2011 at 7:19 下午
@freetstar, 太低调灰阳痿的
[回复]
freetstar
回复:
一月 8th, 2011 at 7:34 下午
@Mucid, 其实早已经阳痿了的…
[回复]
Mucid
回复:
一月 8th, 2011 at 8:00 下午
@freetstar, 上长沙五洲医院,有两把刷子
freetstar
回复:
一月 8th, 2011 at 8:08 下午
@Mucid, 好yd..
[回复]