shell编程实现创建新用户和打包文件 1、shell编程创建新用户 #! /bin/bash `useradd $1` `echo $2 | passwd --stdin $1` 假设这个文件的名称为test.sh,则操作方式为: ./test.sh admin 123456 其中1参为用户名,2 ...
                            
                            
                                分类:
系统相关   时间:
2021-03-31 12:11:52   
                                阅读次数:
0
                             
                    
                        
                            
                            
                                vi readreply.sh #!/bin/bash#第一部分 echo -n "What is your name?"readecho "Your name is $REPLY" #已将变量的值从标准输入读到REPLY #第二部分echo -n "What is the name of your ...
                            
                            
                                分类:
系统相关   时间:
2021-03-30 13:53:42   
                                阅读次数:
0
                             
                    
                        
                            
                            
                                . shell逻辑表达式 #!/bin/bash FILE_BASED_ENCRYPTION="true" if [ "$FILE_BASED_ENCRYPTION" == "true" ]then echo "if: first one" || echo "if: second one"else  ...
                            
                            
                                分类:
系统相关   时间:
2021-03-30 13:52:37   
                                阅读次数:
0
                             
                    
                        
                            
                            
                                
                    解决国内gitclone慢的问题 问题 当我们在git bash里clone资源的时候往往很慢,只有十几K。 解决办法 第一步:打开www.gitclone.com 第二步:嵌入一段字符: 比如:目标对象是: git clone https://github.com/iissnan/hexo-the ...
                            
                            
                                分类:
其他好文   时间:
2021-03-30 12:52:02   
                                阅读次数:
0
                             
                    
                        
                            
                            
                                
                    这是我踩到的坑,前提是你防火墙和阿里云安全组都开放3306端口 找到Docker下的MySQL查看服务是否启动。 命令 docker ps 如果发现启动了在检测是否被外部访问 我们进去MySQL内部 docker exec -it 174d28305a3f bash 这里的174d28305a3f  ...
                            
                            
                                分类:
数据库   时间:
2021-03-29 12:25:26   
                                阅读次数:
0
                             
                    
                        
                            
                            
                                
                    你好。 你写bash的时候,喜欢这样么? if [[ "0" == "1" ]] then; echo "True" else echo "False" fi 还是这样? if [ "0" == "1" ] then; echo "True" else echo "False" fi 现在,讲一下区 ...
                            
                            
                                分类:
其他好文   时间:
2021-03-29 11:35:54   
                                阅读次数:
0
                             
                    
                        
                            
                            
                                
                    1、检测两台服务器指定目录下的文件一致性 #!/bin/bash ##################################### #检测两台服务器指定目录下的文件一致性 ##################################### #通过对比两台服务器上文件的md5值,达到 ...
                            
                            
                                分类:
系统相关   时间:
2021-03-26 15:20:05   
                                阅读次数:
0
                             
                    
                        
                            
                            
                                
                    #!/bin/bash mkdir /etc/yum.repos.d/repo mv /etc/yum.repos.d/*.repo /etc/yum.repos.d/repo curl -o /etc/yum.repos.d/CentOS-Base.repo https://mirrors.ali ...
                            
                            
                                分类:
其他好文   时间:
2021-03-18 14:42:38   
                                阅读次数:
0
                             
                    
                        
                            
                            
                                #!/bin/bash #检测whois命令是否存在,不存在则安装jwhois包is_install_whois(){ which whois &> /dev/null if [ $? -ne 0 ];then yum install -y jwhois fi}is_install_whois#定义 ...
                            
                            
                                分类:
其他好文   时间:
2021-03-18 14:10:30   
                                阅读次数:
0
                             
                    
                        
                            
                            
                                
                    cmder介绍 简介 windows10中常用的命令行终端有cmd,powershell。其它需手动安装的终端有git bash(对于git命令),xshell(对于ssh连接远程主机附带linux命令) 集成多种终端,实现高效开发的命令行工具cmder,可以实现cmd,git,ssh,linux多 ...
                            
                            
                                分类:
其他好文   时间:
2021-03-18 14:03:40   
                                阅读次数:
0