1、linux命令將一個(gè)文件夾里面的所有文件復(fù)制到指定文件里
語(yǔ)法:cp -r dir1/. dir2 千萬(wàn)記著有dir/后面有一個(gè)小點(diǎn)。
如果指定文件夾里存在相同文件需要先刪除
rm -rf /ftp/ZJNX/*
否則會(huì)一個(gè)個(gè)文件提示你確認(rèn)linux命令,使用cp -rf 也一樣提示
2、linux防火墻有關(guān)命令
1.查看防火墻狀態(tài):
firewall-cmd --state
2.啟動(dòng)防火墻
systemctl start firewalld
3.關(guān)閉防火墻
systemctl stop firewalld
4.檢查防火墻開放的端口
firewall-cmd --zone=public --add-port=80/tcp --permanent。[root@bogon ~]# firewall-cmd --zone=public --add-port=7066/tcp --permanent。when a citizen goes through the formalities of changing his permanent residence registration, the public security organ shall record the change of the address of the citizen's permanent residence under the relevant computer-read item in the resident identity card and inform the citizen himself of the fact.。
5.開放一個(gè)新的端口
firewall-cmd --zone=public --add-port=8080/tcp --permanent
6.重啟防火墻
firewall-cmd --reload
7.驗(yàn)證新增加端口是否生效
firewall-cmd --zone=public --query-port=8080/tcp
8.防火墻開機(jī)自啟動(dòng)
systemctl enable firewalld.service
9.防火墻取消某一開放端口
firewall-cmd --zone=public --remove-port=9200/tcp --permanent
防火墻開機(jī)禁用:systemctl disable firewalld
3、查看指定端口號(hào)和進(jìn)程號(hào):如要查詢8080端口的進(jìn)程號(hào):netstat -tunlp | grep 8080
根據(jù)進(jìn)程名查看:ps–ef|grep進(jìn)程名
4、tomcat開放制定端口:如開放8080端口;
firewall-cmd --zone=public --add-port=8080/tcp --permanent
進(jìn)行8080端口開放配置;
命令解析:
--zone #作用域
--add-port=8080/tcp #添加端口,格式為:端口/通訊協(xié)議
--permanent #永久生效,沒有此參數(shù)設(shè)置,重啟后會(huì)失效。
重啟防火墻linux命令,輸入命令:
firewall-cmd --reload
發(fā)表于 2019-11-14 14:32于云清 閱讀(...) 評(píng)論(...) 編輯