tartapearchives,用来打包文件,文件格式具备可移植性打包(或者叫归档,因为不压缩):#-c创建文件,-f指定文件名tar-cfbundle.tarfile1file2...#支持通配符tar-cfbash_bundle.tar"*.sh"追加:#-r向已存在的包中添加一个文件tar-rfbash_bundle.tarnew.sh#对比时间戳,比同名文件新的话才添加#vv是为了输出详细
原创 2021-01-15 19:04:23
198阅读
自动备份归档校验 删除原目录
原创 2017-06-28 15:10:57
2800阅读
1点赞
定时备份服务器,一般的都能使用: #!/bin/bash DATE=`date +%Y_%m_%d` stu_dir=/home/wwwroot/backup/app/xxx cd /home/wwwroot tar zcvf student_$DATE.tar.gz student scp -P
原创 2022-05-07 21:36:06
282阅读
rman备份脚本#! /bin/bashsu - oracle <<!rman target /<<EOFbackup AS COMPRESSED BACKUPSET  databaseinclude current controlfile format'/orabak/db_%d_%T_%s'plus archivelog format'/orabak/arch_%d_
转载 2015-07-23 20:14:00
96阅读
2评论
[centos@lob1 scripts]$ vi sh03.sh#! /bin/bash#Program#      This program shows "Hello World!" in your screen.#History#2014/09/15 lobs Mon releasePATH=/bin:/sbin:/usr/bin:usr/s
原创 2014-09-15 15:06:09
422阅读
一、GoogleCloudStorge介绍GoogleCloudStorage,是GoogleCloudPlatform的一项服务,为广泛的数据类型提供了统一的对象存储,包括活跃数据和存档数据。它可分为中个存储类别:区域、多区域、近线和远线。所有类别都提供了无限数据、用于数据访问的相同工具和API、OAuth和细粒度访问控制、访问其他GoogleCloudStorage服务和按使用付费模式的功能。
原创 2019-05-09 14:34:29
1913阅读
d=`date +%Y%m%d` source_dir=/root for i in `find  $source_dir  -maxdepth 1 -type f |grep  ".txt$"`    do    txt_name=`echo "$i" | gawk -F "/" '{ print $NF}'`    backup_name=`echo "$txt_name"|sed s/.tx
原创 2019-01-07 11:24:00
920阅读
最简单的例子 —— Hello World!几乎所有的讲解编程的书给读者的第一个例子都是 Hello World 程序,那么我们今天也就从这个例子出发,来逐步了解 BASH。用 vi 编辑器编辑一个 hello 文件如下:#!/bin/bash# This is a very simple exampleecho Hello World这样最简单的一个 BASH 程序就编写完了。这里有
转载 精选 2008-07-29 10:44:19
4672阅读
1g表 每行都有可能被更新,故全表备份 检测备份是否在进行 [root@hadoop1 ~]# netstat --numeric-ports | grep 3306tcp 0 0 hadoop1:37692 121.110.203.226:3306 ESTABLISHED您在 /var/spool
转载 2017-12-22 16:30:00
93阅读
2评论
系统应该是Alpine Linux LXD(Linux容器),那么入股在其中安装 bash shell呢apk updateapk upgradeapk add bash# 安装 bash 文档apk add bash-doc# 安装 bash 自动命令补全apk add bash-completion# 使用 bash 作为 shellbash# 需要从主机登录到 Alpine Linux LXD 虚拟机,比如我从kubernets进去kubectl exec -it .
原创 2021-06-17 12:25:10
2639阅读
系统应该是Alpine Linux LXD(Linux容器),那么入股在其中安装 bash shell呢apk updateapk upgradeapk add bash# 安装 bash 文档apk add bash-doc# 安装 bash 自动命令补全apk add bash-completion# 使用 bash 作为
原创 2022-03-10 10:33:40
1795阅读
CTRL 键相关的快捷键: Ctrl + w - 删除最后输入的单词  Ctrl + a Ctrl + e Ctrl + b Ctrl + f Ctrl + d Ctrl + h Ctrl + u Ctrl + k Ctrl + r Ctrl + l Ctrl + c Ctrl + z, jobs, bg, fg   ALT 键相关的快捷键: 平
转载 精选 2011-05-27 18:16:20
768阅读
CentOS6yum update bash--Version bash-4.1.2-15.el6_5.2.x86_64CentOS5 x86-64wget http://mirrors.aliyun.com/centos/5/updates/x86_64/RPMS/bash-3.2-33.el5_10.4.x86_64.rpm    && rpm -
原创 2014-09-28 08:40:25
1226阅读
                        Bash脚本基础     BASH = GNU Bourne-Again Shell,BASH 是 GNU 组织开发和推广的一个项目。Bash脚本类似批处理,简单来讲就是把许多的指令集合在一起,并提供循
原创 2017-06-15 20:32:16
590阅读
bash中命令介绍
原创 2017-10-27 18:02:51
590阅读
Bash shell 的算术运算有四种方式:1:使用 expr 外部程式加法 r=`expr 4 + 5`echo $r注意! '4' '+' '5' 这三者之间要有空白r=`expr 4 * 5` #错误乘法 r=`expr 4 \* 5`2:使用 $(( ))r=$(( 4 + 5 ))echo...
转载 2014-04-17 17:15:00
227阅读
bash n xxx.sh 检查脚本的语法格式, bash x xxxx.sh 显示脚本的执行顺序
转载 2019-10-22 08:20:00
589阅读
2评论
Author: Daniel Robbins ([email]drobbins@gentoo.org[/email]), 总裁兼 CEO, Gentoo Technologies, Inc. Bash $ echo $myvar foo   我们希望回显 "fooThis is my environment variable!bar",但却不是这样。错在哪里?简单地说,bash
转载 2007-10-15 14:57:49
659阅读
bash
转载 精选 2015-08-20 14:14:51
684阅读
Knowing how conditionals work in bash open up a world of scripting possibilities. We’ll learn the basic syntax, including if, else, and elif. Then we'
转载 2021-02-09 03:04:00
606阅读
2评论
  • 1
  • 2
  • 3
  • 4
  • 5