wenfengsun

Linux命令集合

Posted on: February 3, 2012

curl –compressed -o /dev/null -w %{time_connect}:%{time_starttransfer}:%{time_total} -s http://s1.t.itc.cn/mblog/pic/20122_3_12/13470602121109497.jpg
打印连接时间,开始传输时间和总耗时,并不显示curl获取的结果。
gdb 可以进入c调试模式,
#>gdb curl
GNU gdb Fedora (6.8-27.el5)
Copyright (C) 2008 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type “show copying”
and “show warranty” for details.
This GDB was configured as “x86_64-redhat-linux-gnu”.
(gdb) r –compressed -o /dev/null -w %{time_connect}:%{time_starttransfer}:%{time_total} -s http://s1.t.itc.cn/mblog/pic/20122_3_12/13470602121109497.jpg
可以打印其中的调试信息;如果停止响应,^c可以查看停止在何处;bt可以查看更详细的信息。
—————
shell命令行快捷键:
1. ctrl+a:回到行首
2. ctrl+e:回到行尾
3. crtl+r:在历史中查找
4. esc+b:光标回退一个单词
5. esc+f:光标前进一个单词
6. ctrl+u:删除到行尾

vi命令快捷键:
dw:删除单词
dd:删除整行
dG:删除到文件末尾
gg:回到文件开头
G:回到文件末尾
A:行标移动到行末尾,并切换为insert状态
h:向前一个字符
l:向后一个字符
j:向上一行
k:向下一行
ctrl+f:向下翻页
ctrl+b:向上翻页

linux配置ssh公钥:
首先在本机生成公钥:ssh-keygen -t rsa
一路回车,在~/.ssh里有is_rsa和id_rsa.pub
将公钥的内容:id_rsa.pub的内容拷贝到对应机器的~/.ssh中的authorized_keys文件中即可。

alias ll=’ls -lrt’ 表示为别名ll设置实际操作命令;
awk ‘{sum+=$0}END{print sum/NR}’ 求平均值

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: