Last active
October 18, 2016 02:20
-
-
Save kaiye/44484b8209bac960da75e288c10fcedd to your computer and use it in GitHub Desktop.
常用 Linux 命令行
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 网络 | |
# 查看本地公网 IP | |
curl ifconfig.me | |
dig 1024.io | |
dig -x 104.155.233.156 | |
# 并发测试 | |
ab -n 1000 -c 1000 http://www.meizu.com/ | |
# 全站抓取 | |
wget -r -p -np -k http://www.meizu.com/es/ | |
# 黑客 | |
hydra -l username -P password.txt -o ok.lst -t 1 -vV -f example.com http-post-form "/login:uname=^USER^&pwd=^PASS^:result\"\:false" | |
# 密码字典生成 | |
crunch 2 2 0123456789 -t dd -o password.txt -p mom dad me | |
# git | |
# 把从 bd9eea0(旧,不包含) 到 64902be(新,包含) 提交修改的文件打包 | |
git log --oneline --name-status bd9eea0...64902be | grep -vE "^\w{7}\s" | grep -vE "^D\s" | awk '{print substr($0,3)}'| sort | uniq > filelist.txt | |
tar -zcvf filelist.tar.gz -T filelist.txt | |
grep "`git status -s | awk '{$1="";print $0}' | sed 's/^ *//' | sed 's/^"//' | sed 's/"$//'`" filelist.txt | |
# scp | |
scp -i ~/.ssh/google_compute_engine ~/Projects/test/weibo.com.html [email protected]:/home/wwwroot/app.1024.io/demo/ | |
# rsync | |
rsync -av trans-to-alias.ssh sqa:/data/nginx/conf/vhosts/ | |
rsync -av -n file-wont-transfer.txt [email protected]:~/file-wont-transfer.txt | |
# 文件查找 | |
ls -lR | egrep -v '^d' | awk '$5>10240{print}' | |
find . -maxdepth 1 -size +10k | |
find . -size +100k \( -name \*.png -o -name \*.jpg \) -print | xargs tar -zcvf images.tar.gz | |
find . -size +100k| xargs -I {} mv {} ./test | |
find ./static -type f | wc -l | |
# 本地开发 | |
# mz-fis 查看文件配置项 | |
mz inspect sqa --files='/widget/nav-pop/nav-pop.scss' | |
# npm | |
# 本地开发 xxx 模块时,在 xxx 模块目录使用 npm link 将模块注册到全局,在调用方使用 npm link xxx 将全局注册到当前项目 | |
npm ls -g --depth=0 | |
# autojump 目录权重查看、提升、降低 | |
autojump -s | |
autojump -i 20 | |
autojump -d 40 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment