標籤:workspace xxxxx 檔案上傳 srv ade art arc 速度 curl
scp
把本地檔案上傳到server上
scp -P 1234 config/cert/dev/client.pem [email protected]:/srv/rorapps/fgcc/config/cert/production
把server資料傳到本地
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
svn 遷移到 git
svn to git
git svn clone http://svn.magus-soft.com/svn/movie/server/touch -s
git for-each-ref refs/remotes/tags | cut -d / -f 4- | grep -v @ | while read tagname; do git tag "$tagname" "tags/$tagname"; git branch -r -d "tags/$tagname"; done
git for-each-ref refs/remotes | cut -d / -f 3- | grep -v @ | while read branchname; do git branch "$branchname" "refs/remotes/$branchname"; git branch -r -d "$branchname"; done
git remote add origin [email protected]:movie_java/touch.git
git branch -a
git push origin ‘*:*‘
git push origin --all
git push origin --tags
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 [email protected]**.**.**.**
ssh 無password登陸 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 查日誌
grep 尋找內容 記錄檔
-A50 向下50行
-B50 向上50行
-wc 統計
-E 尋找匹配一組資料
tail -f
grep -o ‘cid=>[^,]*‘ tmp/dx_event_async_04121842.log |sort |uniq
grep --color -E ‘A|B|C‘ file.log
siege 壓力測試
/usr/local/Cellar/siege/3.0.7_1/bin/siege -c 50 -r 100 http://xxxxxxxxxxxxxxxx/ticket/v4/callback/zhifu_callback
mitmproxy 代理分析請求完整的參數get/posthttp://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
curl Access-Control-Allow-Origin 是 *,限定於 GET,POST,PUT
curl -X PUT -H "Origin: http://mendd.com" -Iv https://s3.cn-north-1.amazonams.com.cn/****.png
svn,git,scp,rsync,rake,ssh,wget,axel,aria2,nohup,grep,tail,siege,mitmproxy,ulimit,netstat,lsof