总算能够启动服务器上的浏览器来浏览网页了

现在我用的命令 $ ssh -X myserver firefox -no-remote
myserver是我通过ssh的config设置的我服务器的别名

参考:

Launch firefox on a remote linux server
from Command-Line-Fu by KoRoVaMiLK
$ ssh -X user@REMOTESERVER firefox -no-remote

Actually 'firefox' is a script that then launches the firefox web browser. You need to specify the 'no-remote' option in order to launch remote firefox and not your local one (this drove me crazy time ago)
http://feedproxy.google.com/~r/Command-line-fu/~3/N_PD1YbZqm...

发现这个比ssh -d 好,因为我直接在上面用download them all 这个下载mp3直接保存在服务器上

用awk和netstat查看网络链接情况

最佳答案:

http://www.cyberciti.biz/tips/netstat-command-tutorial-examp...


中文资源:

  netstat -an | awk '/^tcp/{ A[$NF]++} END{ for (a in A) print a, A[a]}'
  netstat -an |awk '/LISTEN/{next};/^tcp/{s=split($5, N,":"); A[N[s-1]]++} END{ for (a in A) print a, A[a]}'  

参考和参数详细解释: http://hi.baidu.com/thinkinginlamp/blog/item/afbcab64b1ad81f...

先来看看netstat:

netstat -n

Active Internet connections (w/o servers)
Proto Recv-Q Send-Q Local Address Foreign Address State
tcp 0 0 123.123.123.123:80 234.234.234.234:12345 TIME_WAIT

你实际执行这条命令的时候,可能会得到成千上万条类似上面的记录,不过我们就拿其中的一条就足够了。


再来看看awk:

/^tcp/
滤出tcp开头的记录,屏蔽udp, socket等无关记录。

state[]
相当于定义了一个名叫state的数组

NF
表示记录的字段数,如上所示的记录,NF等于6

$NF
表示某个字段的值,如上所示的记录,$NF也就是$6,表示第6个字段的值,也就是TIME_WAIT

state[$NF]
表示数组元素的值,如上所示的记录,就是state[TIME_WAIT]状态的连接数

++state[$NF]
表示把某个数加一,如上所示的记录,就是把state[TIME_WAIT]状态的连接数加一

END
表示在最后阶段要执行的命令

for(key in state)
遍历数组

print key,"\t",state[key]
先来看看netstat:

netstat -n

Active Internet connections (w/o servers)
Proto Recv-Q Send-Q Local Address Foreign Address State
tcp 0 0 123.123.123.123:80 234.234.234.234:12345 TIME_WAIT

你实际执行这条命令的时候,可能会得到成千上万条类似上面的记录,不过我们就拿其中的一条就足够了。


再来看看awk:

/^tcp/
滤出tcp开头的记录,屏蔽udp, socket等无关记录。

state[]
相当于定义了一个名叫state的数组

NF
表示记录的字段数,如上所示的记录,NF等于6

$NF
表示某个字段的值,如上所示的记录,$NF也就是$6,表示第6个字段的值,也就是TIME_WAIT

state[$NF]
表示数组元素的值,如上所示的记录,就是state[TIME_WAIT]状态的连接数

++state[$NF]
表示把某个数加一,如上所示的记录,就是把state[TIME_WAIT]状态的连接数加一

END
表示在最后阶段要执行的命令

for(key in state)
遍历数组

print key,"\t",state[key]
打印数组的键和值,中间用\t制表符分割,美化一下。

把任何rss变成可以嵌入到你网页的小区块。yahoo提供的服务

可以定制简单样式。非常方便 http://kentbrewster.com/badger/

在开始写css之前,由于不同浏览器的默认样式不同,有时候需要先统一一下所有基本html元素的样式默认值,因此就会用的reset css,样式重置。yahoo的yui提供了这样的css可以直接用。 http://developer.yahoo.com/yui/reset/ 同样是 yui2的其它几个基本css样式也很值得细读和参考,并直接使用! :) http://developer.yahoo.com/yui/base/ http://developer.yahoo.com/yui/fonts/ http://developer.yahoo.com/yui/grids/