一:数据库
MySql
mysql -h host -u username -p password
set names utf8
show命令
show variables
show status
show [full] processlist
show profiles
show profile [cpu,block io,all,…] for query queryId
Redis
redis-cli -h host -p port -a “password”
key *
select db
info memory
zadd sorted_set_name score id
zscore sorted_set_name id
zrevrange sorted_set_name 0 -1
zrevrange sorted_set_name 0 -1 withscores
zrange sorted_set_name 0 -1
zrange sorted_set_name 0 -1 withscores
zrevrank sorted_set_name id
zincrby sorted_set_name score id
zrem sorted_set_name id
del sorted_set_name
MongoDB
mongo host
mongo host port
mongo host port/dbName
mongo host port/dbName -u username -p password
mongoexport -h host -u username -p password -d dbname -c collectionname -o file –type json/csv -f field
mongoimport -h host -u username -p password -d dbname -c collectionname –file filename –headerline –type json/csv -f field
二:Git
stash功能
git stash
git stash save “stashName”
git stash list
git stash pop
git stash aplly “stashName”
回退功能
git reset –hard “commit id”
分支对比
git log dev…master
git log –left-right dev…master
git log dev..master
git log dev ^master
rebase功能(合并本地仓库的多个commit,不要修改已经提交到远程仓库的commit)
git rebase -i HEAD~3
三:NodeJs
hexo
hexo new “pageName”
hexo new draft “draftName”
hexo generate/hexo g
hexo server/hexo s
hexo deploy/hexo d
四:Java
jstack pid
jmap -histo[:live]
jmap -heap
jmap -finalizerinfo
jmap -dump:[live,]format=b,file=
jar命令
jar -uvf jarName dirName/className.class
五:Linux
文件安装
dpkg -i <package.deb>
dpkg -r
yum install lrzsz -y
性能分析
top
top -Hp pid
netstat -na | grep ESTAB | grep 8080 | wc -l
sar -n TCP,ETCP 1
远程登录
telent ip port
ssh user@ip
ssh user@ip “command”
scp localfile user@ip:folder
scp -r localfolder user@ip:folder
定时任务
crontab -e
crontab -l
crontab -r
六:Storm
storm ui
storm nimbus
storm supervisor
storm jar [ topology_jar ] [ topology_class ] [ topology_name]
storm kill [ topology_name [- w wait_time]
storm deactivate [topology_name]
storm activate [topology_name]
storm rebalance [topology_name] [-w wait_time] [-n worker_count] [-e component_name=executer_count]
七:adb命令(Android调试工具)
adb devices
adb connect ip:port
八:Python
包管理工具(pip)
pip install packageName
pip install packageName=version
pip install ‘packageName>=version’
pip install –upgrade packageName
pip uninstall packageName
pip search packageName
pip list
pip list -o
pip show
pip show -f packageName
scrapy
scrapy command -h
scrapy startproject project_name
scrapy genspider spider_name mydomain.com
scrapy crawl spider_name
九:Arthas
trace com.xxx.ClassName methodName