使用zip命令的-d参数即可删除zip包中的特定文件。 示例:假设有test.zip,包含_code(目录)、_code.zip、readme.txt三个文件,现在要删除test.zip中的_code目录,则执行如下命令 zip -d test.zip _code zip -m myfile.zip ./rpm_info.txt 向压缩文件中myfile.zip中添加rpm_info.txt文件 from:https://www.cnblogs.com/jifeng/p/7839248.html
View Details返回上一次目录 有时候千辛万苦进入了一个很深层的目录,一不小心输入了cd并回车,有什么办法快速回到刚才所在的目录呢?对于bash来说,只需要很管理的一个命令: cd – 该命令等同于cd $OLDPWD,关于这一点在bash的手册页(可使用命令man bash访问其手册页)中有介绍:
1 |
An argument of - is equivalent to $OLDPWD. |
并且它还会返回上一次目录的物理路径。 from:https://www.cnblogs.com/yixius/articles/6971080.html
View Details服务器改了密码,试过密码多次后出现:
1 |
ssh_exchange_identification: read: Connection reset by peer |
可以通过ssh -v查看连接时详情
1 2 3 4 5 6 7 8 9 10 11 12 13 14 |
OpenSSH_6.6.1, OpenSSL 1.0.1k-fips 8 Jan 2015 debug1: Reading configuration data /etc/ssh/ssh_config debug1: /etc/ssh/ssh_config line 56: Applying options for * debug1: Connecting to xxx [xx] port 22. debug1: Connection established. debug1: identity file /home/yanue/.ssh/id_rsa type -1 debug1: identity file /home/yanue/.ssh/id_rsa-cert type -1 debug1: identity file /home/yanue/.ssh/id_dsa type -1 debug1: identity file /home/yanue/.ssh/id_dsa-cert type -1 debug1: identity file /home/yanue/.ssh/id_ecdsa type -1 debug1: identity file /home/yanue/.ssh/id_ecdsa-cert type -1 debug1: identity file /home/yanue/.ssh/id_ed25519 type -1 debug1: identity file /home/yanue/.ssh/id_ed25519-cert type -1 ........ |
最后找打解决方法:
1 |
vi /etc/hosts.allow |
追加:
1 |
sshd: ALL |
重启ssh就ok了
1 |
service sshd restart |
from:https://www.cnblogs.com/taoquns/p/9590960.html
View Detailsnginx -V
1 2 |
[root@VM_0_15_centos ~]# nginx -V nginx version: nginx/1.10.2 |
检查/换源
1 2 3 4 5 6 7 |
[root@VM_0_15_centos ~]# cd /etc/yum.repos.d/ [root@VM_0_15_centos yum.repos.d]# vim nginx.repo [nginx] name=nginx repo baseurl=http://nginx.org/packages/centos/$releasever/$basearch/ gpgcheck=0 enabled=1 |
升级
1 |
[root@VM_0_15_centos yum.repos.d]# yum update nginx |
[root@VM_0_15_centos ~]# nginx -V nginx version: nginx/1.16.0 检查时报错
1 2 3 |
[root@VM_0_15_centos yum.repos.d]# nginx -t nginx: [emerg] module "/usr/lib64/nginx/modules/ngx_http_geoip_module.so" version 1010003 instead of 1016000 in /usr/share/nginx/modules/mod-http-geoip.conf:1 nginx: configuration file /etc/nginx/nginx.conf test failed |
解决问题
1 2 |
<strong>yum remove nginx-mod* ### 卸载旧模块 </strong> |
1 |
<strong>yum install nginx-module-* ### 安装新的</strong> |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 |
[root@VM_0_15_centos yum.repos.d]# rpm -qa|grep nginx nginx-mod-http-perl-1.10.3-1.el6.x86_64 nginx-mod-mail-1.10.3-1.el6.x86_64 nginx-1.16.0-1.el6.ngx.x86_64 nginx-filesystem-1.10.3-1.el6.noarch nginx-mod-stream-1.10.3-1.el6.x86_64 nginx-mod-http-xslt-filter-1.10.3-1.el6.x86_64 nginx-mod-http-geoip-1.10.3-1.el6.x86_64 nginx-mod-http-image-filter-1.10.3-1.el6.x86_64 [root@VM_0_15_centos yum.repos.d]#<strong> yum remove nginx-mod*</strong> [root@VM_0_15_centos yum.repos.d]#<strong> yum install nginx-module-*</strong> [root@VM_0_15_centos yum.repos.d]# nginx -t nginx: the configuration file /etc/nginx/nginx.conf syntax is ok nginx: configuration file /etc/nginx/nginx.conf test is successful [root@VM_0_15_centos yum.repos.d]# nginx -s reload ###直接平滑重启不可以 |
from:https://www.cnblogs.com/mingetty/p/11125391.html
View Details