@程序员,快来 Get 常用的 Linux 命令和技巧!
ssh -L{你PC端的端口号}:localhost:{数据库端的端口号} root@{服务器IP地址}
ssh -L3308:localhost:3306 root@192.168.1.2
:w !sudo tee %
sudo !!
history | grep "/tmp"
yes | yum install curl
yes no| yum install curl
nohup wget http://large-files.com/10gb-super-movie.avi &
$ netstat -tulpn | grep 80
tcp6 0 0 :::80 :::* LISTEN 10177/java
ps aux | grep 10177
less /var/log/my-app/my-app.log.2015.12.14.gz
tail -f /var/log/my-app/my-app.log | grep ERROR
ps aux --sort=-pcpu | head -n 4
ps aux --sort=-rss | head -n 4
watch -n 1 dat
zip -q archive.zip big-file.jpg
./very-verbose.sh 1>/dev/null
0 22 * * 1-5 /opt/scripts/send-report.sh 2>/var/log/scripts/report-error.log
热 文 推 荐
☞
☞
