查看系统安装了哪些软件
rpm -qa
rpm -qa | grep XXXX
设置环境变量
// 添加环境变量
[root@VM_0_11_centos ]vi /etc/profile
export PATH=$PATH:/usr/local/curl/bin
// 刷新环境变量
[root@VM_0_11_centos ]source /etc/profile
防火墙相关
systemctl start firewalld.service-
systemctl stop firewalld.service
firewall-cmd --state
firewall-cmd --zone=public --add-port=9200/tcp --permanent
firewall-cmd --reload
firewall-cmd --list-all
firewall-cmd --query-port=9200/tcp
netstat -ln|grep 3499
内容查找
grep -rn "unable to find usable node.js executable" ./
grep -rn "unable to find usable node.js executable" ./bin/kibana
文件查看
df -lh
df -Th
du -h 文件路径
du -ah
du -ah --max-depth=1
ls -alt
ls -alrt
find ./ -name 'log.php' -exec ls -l {} \;
find ./ -newermt "-48 hours" -ls
压缩解压
tar -czvf bak_`date "+%Y%m%d%H%M%S"`.tar.gz . --exclude=runtime --exclude=*.tar.gz
tar -zxvf 压缩文件名.tar.gz
文件查看是unix还是DOS
:set ff?
set ff=unix
文件传输
SCP -P 8080 /data/upload.zip [email protected]:/wwwroot/