.bashrc的一個(gè)環(huán)境變量 PS1='[\[\033[01;32m\]\h:\[\033[01;34m\]\w\[\033[00m\]]\n\$ '
查看文件大小 du -h
查看文件在文件系統(tǒng)中的信息 df
查看動(dòng)態(tài)庫(kù)的內(nèi)部符號(hào) nm -D
查看進(jìn)程號(hào) ps -aux
查看進(jìn)程樹(shù) pstree
grep -rl DEBUG | xargs perl -pi -e "s|內(nèi)容|\/\/內(nèi)容|g"
注釋當(dāng)前有DEBUG字段的文件內(nèi)的所有含有“內(nèi)容”的部分fuck_the_GFW.sh#!/usr/bin/expect -f
set timeout 30
spawn ssh -D 7070 -l colleague 204.12.234.13
expect "password: "
send "vlctech\r"
interact
cscope生成索引文件 find . -name "*.h" -o -name "*.c" -o -name "*.cc" > cscope.files
cscope -Rbkq -i cscope.files
禪道因?yàn)槟承┻M(jìn)程占用服務(wù)而無(wú)法使用的問(wèn)題
用netstat -lntp | grep :80 找出占用80端口的進(jìn)程
例如:
[root@localhost ~]# netstat -lntp | grep :80
tcp 0 0 0.0.0.0:80 0.0.0.0:* LISTEN 3040/nginx
這里的程序名就是nginx
嘗試用killall [程序名],看能不能關(guān)閉他。
例如:killall nginx
如果不行,用ps 找出他的PID,
例如:
[root@localhost ~]# ps aux | grep nginx | grep -v grep
root 5406 0.0 0.2 5996 756 ? Ss 03:32 0:00 nginx: master process /usr/local/webserver/nginx/sbin/nginx
這里的pid是 5406
然后用kill命令關(guān)掉它。
例如:kill 5406
PS:如果是通過(guò)apt-get安裝的apache,可以嘗試通過(guò)/etc/init.d/[程序名] stop 停止進(jìn)程,或者
通過(guò)chkconfig [程序名] off 關(guān)閉開(kāi)機(jī)啟動(dòng)。
redhat系統(tǒng)導(dǎo)入KEY
http://www.liusuping.com/ubuntu-linux/Redhat-linux-centos-yum.html