Linux命令使用:
跳转至某一目录:CD dirName (CD Guaishou)
返回上一层目录:CD ..
查看当前服务器时间:date
查看当前目录下的文件信息:ls
查看当前目录下的文件信息且看它所具备的权限:ls -l 或 ll
新建一个目录:mkdir dirame 如:mkdir guaishou
查看某文件中特定的内容:find ./ -name 文件名 | xargs grep "需查找的内容"
或 cat 文件名 grep "需查找的内容"
如:需查看liuy.log的日志文件中名字叫guaishou的内容:
find ./ -name liuy.log | xargs grep "guaishou"
查看当前登录用户:who / who is she
查看当前系统运行情况:top
查看当前内存情况:free -m
查看当前系统cpu信息:一般情况下此信息都在proc目录下,直接使用命令:cat cpuinfo
查看目前系统使用哪种shell
echo $shell
查看当前目录下内容:
echo $home
linux移动文件或重命名文件
mv 源文件名 目标文件名
查看当前位于哪个目录: pwd