wget:下载网络资源命令

格式:wget 资源地址

例如:wget ftp://ftp.cuhk.edu.hk/pub/packages/mail-server/postfix/official/postfix-3.1.3.tar.gz

find

查找文件名

find-name "redis*" 

查找当前目录下以redis开头的文件或者目录,查找范围包含子目录

find . -maxdepth 1 -name "redis*" 

搜索深度为1,即在当前目录搜索,不进入子目录

查找字符串

查找当前目录下的所有文件中是否含有字符串“hahaha” 
find .|xargs grep -ri "hahaha" 
查找当前目录下的所有文件,是否包含字符串“hahaha”,-l表示只打印出文件名 
find .|xargs grep -ri "hahaha" -l

查看Linux是32位还是64位机

$ file /sbin/init 

/sbin/init: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, for GNU/Linux 2.6.18, BuildID[sha1]=36a7688cfae6a4c6acd522df1ef1eb9dcdbdc679, stripped

查看内存大小

free -m

查看端口占用

netstat -ano|grep 3306