随笔分类 -  shell

摘要:转至:https://www.cnblogs.com/tui463/archive/2004/01/13/12663024.html shell脚本练习案例 案例一:通过位置变量创建系统账户及密码 分析 (1)通过位置变量创建 Linux 系统账户及密码 (2)创建用户,111为第一个变量 (3)为 阅读全文
posted @ 2020-09-30 10:53 study_goup 阅读(639) 评论(0) 推荐(0) 编辑
摘要:转至:https://www.cnblogs.com/tui463/archive/2004/01/13/12612228.html shell脚本 shell脚本介绍 shell脚本就是一些命令的集合,能帮助我们更方便管理服务器 shell脚本的创建和执行 自定义脚本都放在sbin目录下 # cd 阅读全文
posted @ 2020-09-30 10:45 study_goup 阅读(172) 评论(0) 推荐(0) 编辑
摘要:转至:https://www.cnblogs.com/gaohongyu/articles/12072594.html #!/bin/bash #Author:GaoHongYu #QQ:1061767621 #Time:2019-12-19 02:47:09 #Name:login.sh #Ver 阅读全文
posted @ 2020-09-29 09:47 study_goup 阅读(336) 评论(0) 推荐(0) 编辑
摘要:转至:https://www.cnblogs.com/gaohongyu/p/12093437.html 效果图: 代码如下: #!/bin/bash #Author:GaoHongYu #QQ:1061767621 #Time:2019-12-24 18:43:22 #Name:ncjk.sh # 阅读全文
posted @ 2020-09-29 09:45 study_goup 阅读(338) 评论(0) 推荐(0) 编辑
摘要:转至:https://www.cnblogs.com/gaohongyu/p/12103925.html 效果如图: 代码如下: #!/bin/bash #Author:GaoHongYu #QQ:1061767621 #Time:2019-12-26 16:30:19 #Name:yumgz.sh 阅读全文
posted @ 2020-09-29 09:43 study_goup 阅读(293) 评论(0) 推荐(0) 编辑
摘要:转至:https://www.cnblogs.com/gaohongyu/p/12105336.html 效果如图: 代码如下: #!/bin/bash #Author:GaoHongYu #QQ:1061767621 #Time:2019-12-24 22:54:36 #Name:dm.sh #V 阅读全文
posted @ 2020-09-29 09:41 study_goup 阅读(225) 评论(0) 推荐(0) 编辑
摘要:大型项目环境预检查脚本,根据自己实际情况修改脚本中变量,给大家一个思路,转载请注明出处~ 转至:https://www.cnblogs.com/gaohongyu/p/13738526.html #!/usr/bin/env bash root=$( cd $(dirname $0) pwd ) s 阅读全文
posted @ 2020-09-29 09:30 study_goup 阅读(134) 评论(0) 推荐(0) 编辑
摘要:转至:https://blog.csdn.net/yjgithub/article/details/80908079 目录 一.简介 二.sh -x 脚本名.sh 三.set -x 一.简介 使用sh -x调试shell脚本 “-x”选项可用来跟踪脚本的执行,是调试shell脚本的强有力工具。“-x 阅读全文
posted @ 2020-09-16 15:19 study_goup 阅读(523) 评论(0) 推荐(0) 编辑
摘要:转至:https://blog.csdn.net/molaifeng/article/details/14123123 中午刷微博时看到一篇有关z.sh的介绍。 众所周知,在linux系统中进入目录都是用cd命令的,若是一般的开发人员,进入服务器的目的明确,每次都是进入服务器中的项目配置目录,同时要 阅读全文
posted @ 2020-09-16 11:51 study_goup 阅读(451) 评论(0) 推荐(0) 编辑
摘要:转至:https://www.cnblogs.com/guanyf/p/7553940.html test命令用法。功能:检查文件和比较值 1)判断表达式 if test (表达式为真) if test !表达式为假 test 表达式1 –a 表达式2 两个表达式都为真 test 表达式1 –o 表 阅读全文
posted @ 2020-09-08 14:39 study_goup 阅读(602) 评论(0) 推荐(0) 编辑
摘要:一、Shell编程四剑客之Find Find工具主要用于操作系统文件、目录的查找,其语法参数格式为: find path -option [ -print ] [ -exec -ok command ] { } \; 其option常用参数详解如下: -name filename #查找名为file 阅读全文
posted @ 2020-09-04 15:36 study_goup 阅读(908) 评论(0) 推荐(0) 编辑
摘要:shell脚本编写自动启动服务方法 前言 ln :创建连接文件 默认创建的是硬连接,好比复制 ,但是两个文件会同步命令:ln ./java/android/aa.txt aaa s :创建的是软连接变为指向(类似于windows的快捷方式:In -s 软链接: 1.软链接,以路径的形式存在。类似于W 阅读全文
posted @ 2020-09-03 13:53 study_goup 阅读(2944) 评论(0) 推荐(0) 编辑
摘要:一、批量上传: #!/bin/bash #SFTP配置信息 #用户名 USER=root #密码 PASSWORD=5EYS40T04BMF #待上传文件根目录 SRCDIR=/u02/dab/sftpFiles #FTP目录 DESDIR=/u01/sftpFiles #IP IP=192.168 阅读全文
posted @ 2020-08-31 16:37 study_goup 阅读(7897) 评论(0) 推荐(0) 编辑
摘要:转至: 最近需求要求定期从一个[定期更新的文件] 中解析员工信息 ,插入到数据库中. 按理来说很简单, 无非就是io流读文件,然后crud balalalala..... 其实不是的, 我我写的这个接口 ,要实现从远程服务器上获取文件然后入库操作 . . . 问题来了, 我怎么去读文件. 这样就用到 阅读全文
posted @ 2020-08-31 16:23 study_goup 阅读(3598) 评论(0) 推荐(0) 编辑
摘要:转至:https://blog.csdn.net/sxh6365966/article/details/83385711 #!/bin/bash #SFTP配置信息 #用户名 YEARS=`date +%Y` MONTH=`date +%m` LOGDAY=`date -d "yesterday" 阅读全文
posted @ 2020-08-31 16:07 study_goup 阅读(5685) 评论(0) 推荐(0) 编辑
摘要:1.ftp自动上传文件脚本 #!/bin/bash ftp -n<<! open 192.168.220.129 user ls toor binary hash cd /path/to/backup lcd /path/to/need/backup prompt mkdir `date +"%Y% 阅读全文
posted @ 2020-08-31 15:53 study_goup 阅读(2205) 评论(0) 推荐(0) 编辑
摘要:原文链接:http://bbs.chinaunix.net/archiver/tid-508290.html 主要步骤如下: 1.为运行shell脚本的本地用户生成密钥对2.将其中的公钥分发到sftp欲登录的远程服务器上3.编写并以上面的本地用户运行shell脚本 一.生成密钥对 在shell脚本中 阅读全文
posted @ 2020-08-31 15:46 study_goup 阅读(504) 评论(0) 推荐(0) 编辑
摘要:转至:https://blog.csdn.net/istronger/article/details/52141530?utm_medium=distribute.pc_relevant.none-task-blog-BlogCommendFromMachineLearnPai2-1.edu_wei 阅读全文
posted @ 2020-08-31 15:44 study_goup 阅读(1523) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示