scp
把本地文件上传到服务器上
scp -P 1234 config/cert/dev/client.pem dev@xx.xxx.xxx:/srv/rorapps/fgcc/config/cert/production
把服务器数据传到本地
scp fgww:/srv/rorapps/fgcc/doc/yunying_20140601-20140601.csv ./
压缩传输
scp -C fgww:/srv/rorapps/fgcc/doc/yunying_20140601-20140601.csv ./
rsync
rsync -azcP huafei_search:/srv/rorapps/huafei2/log/production_20140618.log.bz2 ~/Workspace/test/huafei
文件夹
scp -r fgww:/srv/rorapps/fgcc/doc/static ./
svn VS git
svn
svn checkout server_url
svn status
svn diff **file
svn add **file
svn commit -m "xxx"
svn update
git
git clone server_url
git status
svn diff **file
git add -A
git commit -m "xxx"
git push origin master
rake
防止执行耗时操作时网络中断 nohup
nohup ./cmb_mplus_export_yunying.sh start_time=2014-06-03 end_time=2014-06-03 & [2] 23728
ssh
ssh -vvv -N -L 5433/192.168.0.132/6435 -p 6521 menxu@**.**.**.**
ssh 无密码登陆 http://cn.soulmachine.me//blog/20120102/
wget
usage: wget -i http://*
说明: http://*为下载文件网址及文件名
example: wget -i http://xp6.yyxt.com/201201/GZOS_XP_1.1.iso
用axel加快下载速度
安装axel
apt-get install axel
运行axel
usage: axel -n 10 -o /tmp/ http://xp6.yyxt.com/201201/GZOS_XP_1.1.iso
aria2断点下载文件
apt-get install aria2
example: aria2c http://xp6.yyxt.com/201201/GZOS_XP_1.1.iso
分段下载:
example: aria2c -s 2 http://xp6.yyxt.com/201201/GZOS_XP_1.1.iso
断点下载:
example: aria2c -c http://xp6.yyxt.com/201201/GZOS_XP_1.1.iso
下载torrent文件
example: aria2c -o *.torrent http://*
nohup 任务
nohup rake pay_code:order_record start_time=2014-09-08 end_time=2014-09-08 &
使用 jobs 查看任务。
使用 fg %n 关闭
grep 查日志
siege 压力测试
/usr/local/Cellar/siege/3.0.7_1/bin/siege -c
50 -r 100 http://xxxxxxxxxxxxxxxx/ticket/v4/callback/zhifu_callback
mitmproxy 代理分析请求完整的参数get/post
http://blog.csdn.net/menxu_work/article/details/44780001
ulimit 限制系统用户对shell资源的访问
查看第三方请求连接数
ulimit -a/n
netstat 显示各种网络相关信息
如网络连接,路由表,接口状态 (Interface Statistics),masquerade 连接,多播成员 (Multicast Memberships) 等等
看TCP的连接数
netstat -nap | grep tcp |wc -l
lsof 列出当前系统打开文件的工具
lsof |grep 'test/test3'
lsof -i :3306
lsof -i tcp:80