tar -cvf jpg.tar *.jpg //将目录里所有jpg文件打包成jpg.tar
tar -czf jpg.tar.gz *.jpg //将目录里所有jpg文件打包成jpg.tar后,并且将其用gzip压缩,生成一个gzip压缩过的包,命名为jpg.tar.gz
tar -cjf jpg.tar.bz2 *.jpg //将目录里所有jpg文件打包成jpg.tar后,并且将其用bzip2压缩,生成一个bzip2压缩过的包,命名为jpg.tar.bz
=========检查端口是否被占用=======
netstat -an|grep 8082|grep -i listen
ss -tulpn|grep LISTEN|grep 8082
==========查看linux系统版本=======
cat /etc/os-release
lsb_release -a
hostnamectl
================检查端口是否使用================
netstat -an|grep 6379|grep -i listen
===========递归修改文件权限===============
chmod -R 755 test
==========虚拟机不能用ssh访问解决方案==============
https://yq.aliyun.com/articles/103191
===========查看目录的挂载点==============
df /var/lib/
=========关闭liux防火墙===========
systemctl status firewalld.service systemctl stop firewalld.service
==========RPM=====================
====安装rpm
rpm -ivh <package name>
====删除install的rpm包
rpm -qa | grep -i <keyword>
rpm -e <package name>
=============查看系统位数==========
uname -m
arch
===========SCP===================
scp -r /paasdata/o_1d92gnr8kgubab3102e6ohp1g8/python_redis_cluster_deploy.tar.gz root@192.168.20.100:/zcloud_team/zCloud-1.0.5.0-20190516/RedisV1.0.5.0/installPackage/python
==========查看用户==============
cat /etc/passwd|grep sharding|grep testcase|awk -F: '{print $1 > "delusers.txt"}'
==删除用户
cat /etc/passwd|grep sharding|grep testcase|awk -F: '{print $1}'|xargs -i userdel -fr {}
====查看文件夹占用的内存
du -h -x --max-depth=1