常用命令

来源:互联网 发布:手机怎么删除淘宝评论 编辑:程序博客网 时间:2024/06/05 21:18

Windows常用操作

查看端口进程: netstat -ano | findstr “8086”

强制杀死进程: tskill pid

根据进程id查询进程信息: tasklist | findstr pid

IDEA快捷键及简单使用

file –> new –> module –> java java项目

file –> new –> module –> java Enterprise –> web application javaee项目

file –> new –> module –> maven –> create from archetype (maven-archetype-quickstart)

file –> new –> module –> maven –> create from archetype (maven-archetype-webapp)

file –> new –> module –> spring Initializr spring boot项目

file –> settings –> live templates 配置快捷键

alt + enter 自动补全返回值

ctrl + k 页面字符串查找

ctrl shift r 查找资源文件

ctrl shift t 查找类

alt + insert pojo中快速重写方法

ctrl h 全项目搜索字符串

Eclipse常用快捷键

ctrl+shift+c :注释当前行

ctrl+shift+i :断点取值

ctrl+shift+X/Y :大小写转换

ctrl+shift+l :查看快捷键

ctrl+shift+r :快速复制一行

ctrl+q :回到上次编辑的位置

ctrl+z/y :撤销/反撤销

ctrl+1 :自动补齐 ( ctrl 2 l )

ctrl+shift+o :快速导包

f4 :找子类,看体系结构

alt+shift+s :source

ctrl+w :关闭当前类

ctrl+shift+f :代码格式化

ctrl + alt + ↓(↑) 复制整行

alt + ↓(↑) 交换整行

alt + ←(→) / ctrl+tab 返回上(下)一个操作的类

ctrl+shift+t :打开某个类

搜索:ctrl + H(全项目搜索字符串) crtl + Shift +R(搜索类) ctrl+F

断点:F6(执行下一行代码) F8(进入下一个断点) F5(进入方法内)

sqlyog中: ctrl+a 全选; f8/9 执行

Linux常用指令

显示网络进程:netstat -nplt

查看端口占用:lsof -i:8080

查看详细信息中带zookeeper的进程:ps -aux | grep zookeeper
ps -ef | grep zookeeper

杀死pid为2131的进程:kill -9 2131

设置防火墙2181端口开放:/sbin/iptables -I INPUT -p tcp –dport 2181 -j ACCEPT

保存防火墙配置: /etc/rc.d/init.d/iptables save

关闭防火墙:
临时操作:service iptables status/start/stop

    永久操作:chkconfig iptables --list            chkconfig iptables on/off

/var/run/yum.pid已被锁定, 解决: rm -f /var/run/yum.pid

实时查看日志信息:tail -50f catalina.out

系统间复制: scp 文件名 ip://文件名

查询当前路径及子路径下以bash开头的文件:find . -name ‘bash*’

查看所有文件,包括隐藏文件:ls -a

查看linux版本: lsb_release -a

查看linux位数: getconf LONG_BIT

列出本机所有java进程的pid: jps

原创粉丝点击