scp 文件copy:
scp root@192.168.10.109:/soft/platform3/z_user_org_right/z_user_org_right-3.0.jar ./
文件夹copy:
scp -r root@192.168.10.109:/soft/jdk1.8.0_131/ /
直接单行多行写入文本,无需先vim打开再编辑
1、单行文本
$ echo ‘世界你好’ > filename.txt
2、多行文本
$ cat>filename.txt<<EOF
第一行
第二行
第三行
EOF
查看文件/文件夹大小
du -h –max-depth=1 your_dest_dir
查看当前文件夹所有文件/文件夹大小:du -h –max-depth=1 ./
列出时区:
timedatectl list-timezones
centos时区设置:
timedatectl set-timezone “Asia/Shanghai”
时间设置:
date -s “01:01:01 2012-05-23” //这样可以设置全部时间
centos系统版本查看:
cat /etc/redhat-release
内存查看:
前十占用 ps aux | sort -k4nr | head -n 10
根据名称搜索 ps aux | grep z_u
查看防火墙状态:centos
firewall–cmd —state
查看防火墙端口情况:
firewall-cmd –list-ports
查询指定名称进程
ps -ef| grep z_
查询指定端口
ps -aux | grep 6050
lsof -i:6050