资讯

精准传达 • 有效沟通

从品牌网站建设到网络营销策划,从策略到执行的一站式服务

工作中常用的Linux命令

1. nohup 模式启动 weblogic
     1.启动war包) nohup ./startweblogic.sh &  
2.启动jar包) nohup java -jar xbp-cwhs-cwzw.jar &
 
2. 查看 weblogic 后台日志
           tail  -f  nohup.out
显示500行
tail -500 nohup.out
 
3. 查看当前进程
         ps  -ef|grep  jdk
 
4. 结束进程
    kill  -9 进程号
 
5. 查看网络匹配
         ifconfig
 
6. 文件所有者更改
         chown  -R  用户名   文件 / 目录
 
7.更改文件权限
         chown  777  文件名

 
8. 删除文件
         rm  -rf  文件名
 
9. 解压文件
         1.unzip  common.war (文件名)   -d  common (文件夹名)
2.jar xvf common.war
 
10. 查看防火墙状态
         service   iptables   status
11.防火墙启动关闭
      service iptables stop --停止
     service iptables start --启动
12.重启docker
systemctl restart docker
13.重启网络服务
service netkork restart
14.清空文件内容
[root@centos7 ~]# du -h test.txt 4 .0K    test.txt [root@centos7 ~]# > test.txt [root@centos7 ~]# du -h test.txt    test.txt
15 查看路由状态
route -e
16 开启 rabbitmq
  service rabbitmq-server start
17 查询8080端口是被哪个程序占用了
netstat –anp | grep 8080
18 linux 启动oracle
$ su – oracle 
19 linux 测试端口
ssh -v -p port username@ip
20 traceroute  ip   跟踪路由
22 将dir1下所有文件复制到dir2下了. 如果dir2目录不存在,则可以直接使用
cp -r dir1 dir2
即可。如果dir2目录已存在,则需要使用
cp -r dir1/. dir2
23 查询当前时间
date -R
24 查看ip地址
ifconfig -a
25 单独执行类的main方法
(依赖jar包)         (包名)(main方法路径)
linux  环境      java -cp .:amqp-client-3.3.4.jar:1.jar com.test.rabbitmq.RabbitmqInit
打开cmd命令窗口
window 环境    java -cp .;amqp-client-3.3.4.jar;.;1.jar com.test.rabbitmq.RabbitmqInitForYDZYJX
26 查看系统运行内存信息
free -h
27 查看当前机器ip
hostname -i
28 查看主机名
hostname
29 设置主机名称
hostname xxx

本文标题:工作中常用的Linux命令
链接分享:http://cdkjz.cn/article/iijhpd.html
多年建站经验

多一份参考,总有益处

联系快上网,免费获得专属《策划方案》及报价

咨询相关问题或预约面谈,可以通过以下方式与我们联系

业务热线:400-028-6601 / 大客户专线   成都:13518219792   座机:028-86922220