linux命令

查找文件:

find / -name nginx

 查看启动程序:

netstat -tpln

 建立软连接:

ln -s  源文件 目标文件    -s 是 symbolic象征的意思。

使全局环境变量生效:

source /etc/profile

解压到目录:

tar zxvf /xxx.tar.zip -c /xxx/xx目录

打包:

tar zxvf /xxx.tar.gz ./zzz文件;打包删除:zip -m -r fileName 目录;(-r为递归子目录)

后台运行:

node ~/example.js &
nohup <command> &(后台运行,关掉终端也会继续运行)

查看内存:

df -hl

杀掉进程:

kill -9/-15 pid
查看是否存在某一进程:ps -ef|grep tomcat
查看某端口进程占用:netstat -lnp|grep 3000
查看进程:ps pid
根据名字查看进程:ps a/-a/-u/-x | grep name 所有/同一终端/有效用户/详情

启动防火墙:

systemctl start/status/stop firewalld

查看启动日志:

tail -f catalina.out

 

posted @ 2018-01-04 17:43  maoriaty  阅读(81)  评论(0编辑  收藏  举报