中断进程
ctrl z 和 c 有什么区别?
待完善
jar包相关命令
jar包启动
java -jar xxx.jar
java -jar xxx.jar &
nohup java -jar xxx.jar
nohup java -jar xxx.jar &
以上4种形式的启动有什么区别,带&的可以后台运行。
nohup: 忽略输入并把输出追加到"nohup.out"
查找端口情况
netstat
-t – 显示 TCP 端口。
-u – 显示 UDP 端口。
-n – 显示数字地址而不是主机名。
-l – 仅显示侦听端口。
-p – 显示进程的 PID 和名称。
netstat -nltp
netstat -nltp | grep 8889
netstat -tunlp
netstat -tnlp | grep :8889
ss
systemctl
systemctl start firewalld
systemctl stop firewalld
systemctl status firewalld
磁盘空间
df
df
df -h
du
history
历史命令
whereis
whereis nginx
find
curl
curl http://www.baidu.com
ip
ip a
ps
ps -ef|grep
ps -ef|grep redis
内存
free
free
free -h
磁盘
df
df -h
查看当前路径下的文件大小
du -sh *
vmstat
mkdir 创建文件夹
重复创建文件夹
top
top命令可以对进程的资源占用进行一个统计,进入top命令后按 shift + m,可以按内存排序找到大内存应用。
防火墙
systemctl start firewalld
systemctl stop firewalld
systemctl status firewalld
touch
[root@localhost ~]# touch --help
用法:touch [选项]... 文件...
Update the access and modification times of each FILE to the current time.
A FILE argument that does not exist is created empty, unless -c or -h
is supplied.
A FILE argument string of - is handled specially and causes touch to
change the times of the file associated with standard output.
Mandatory arguments to long options are mandatory for short options too.
touch help.txt 如果不存在则会创建文件