-
Serving HTTP on 0.0.0.0 port 8000
python -m SimpleHTTPServer
-
save root file in vi when you forget typing sudo
:w !sudo tee % -
在当前目录递归搜索单词”eat”,不匹配类似于”feature”或”eating”的字符串:
$ ack -w eat
-
搜索有特殊字符的字符串’$path=.’,所有的元字符(比如’$',’.')需要在字面上被匹配:
$ ack -Q '$path=.' /etc -
除了dowloads目录,在所有目录搜索”about”单词
$ ack about --ignore-dir=downloads
-
只搜索包含’protected’单词的PHP文件,然后通过文件名把搜索结果整合在一起,打印每个文件对应的搜索结果:
$ ack --php --group protected
-
要换取ack支持的文件过滤类型,运行:
$ ack --help-type
-
use less command to view log
$ less -Rinf gs-admin.log
-
cd switch between latest directory
$ cd - -
use less command to view log
$ less -Rinf gs-admin.log
-
list human readable files
$ ls -lha
-
find
$ find /var -name basic.ics $ find /var -user sijitang
-
locate
$ locate -i basic.ics
-
history
$ history|grep ps -
ctrl+L = clear
-
ctrl+D = exit
-
unzip chinese language file
$ unzip -O cp936 luo.zip
-
List open network ports and sockets
$ lsof -i
-
Periodically execute the specified command
$ watch -n 10 who
-
screen
$ screen create new screen: ctrl+A - C switch screen: ctrl+A - N detach screen: ctrl+A - D retach screen: screen -r xxx
-
find bios( Linux-Dell-Bios-Info)
sudo dmidecode -s bios-version
sudo dmidecode -s bios-release-date