simple shell
NOW = $(data + "%Y-%m-%d-%H-%M-%S")
DIR = /export/backup
function exportData(){
exportCmd = "/export/mongodb/bin/mongodump"
$exportCmd -h 127.0.0.1 -u "admin" -p "admin" -d test --gzip -o $DIR/test_$NOW
}
echo export data from test //输出提示信息
exportData //调用function
simple shell的更多相关文章
- python trojan development 3rd —— use python to creative a simple shell
前两篇文章的木马太被动,今天是通过socket和os来进行主动木马编写 有些s13,我真的搞不懂拿一些没过脑子的代码就放到网上去害人,骗流量,还某知名安全企业学院写的,真的服.我的代码自己运行过,很稳 ...
- xv6的作业翻译——作业1 - shell和系统调用
Xv6的lecture LEC 1 Operating systems L1: O/S overview L1:O/S概述 * 6.828 goals 6.828的目标 Understan ...
- [转]一个备份MySQL数据库的简单Shell脚本
本文翻译自 iSystemAdmin 的 <A Simple Shell Script to Backup MySQL Database> Shell脚本是我们写不同类型命令的一种脚本,这 ...
- S5PV210_uart stdio移植
1.stdio : standard input output 标准输入输出 2.printf函数调用到的2个关键函数: vsprintf : 格式化打印信息,最终得到纯字符串的打印信息等待输出 pu ...
- Usual tiny skills & solutions
Ubuntu and Win10 - double OS 2016-02-21 Yesterday I helped my friend install Ubuntu (14.04 LTS) on h ...
- PBS 安装
How to install PBS Pro using the configure script. . Install the prerequisite packages for building ...
- Seafile内部云盘
软件列表 软件 版本 备注 centos 6.4 x86_64 64位系统 mysql mysql5.5.49 本机使用 python 2.7 seafile 依赖python pip 8.1.2 安 ...
- Linux-守护进程的实现
Some basic rules to coding a daemon prevent unwanted interactions from happening. We state these rul ...
- Git - Tutorial [Lars Vogel]
From: http://www.vogella.com/tutorials/Git/article.html Git - Tutorial Lars Vogel Version 5.6 Copyri ...
随机推荐
- apache tomcat (catalina)查版本(solaris/unix)
先进到tomcat的bin目录下(cd /tomcat目录/bin),在执行./version.sh https://blog.csdn.net/vv___/article/details/78653 ...
- MongoDB 查询 $关键词 方法目录
MongoDB $关键字 关系比较符号 $lt $lte $gt $gte $ne MongoDB 查询$关键字 $in $or $all MongoDB limit 选取 skip跳过 sort排序 ...
- 合作开发工具——freeze和pipreqs
以后在合作开发的过程中,难免会用到别人开发到一半或者将自己开发的项目交给别人,在转交项目的时候需要让别人知道本项目中用到了哪些模块,这时可以用到一条命令来帮助我们. pip3 freeze # 获取环 ...
- C#基础加强(4)之秒懂IL、CTS、CLS和CLR
IL(Intermediate Language) 中间语言..Net 平台下不只有 C# 语言,还有 VB.Net.F# 等语言.IL 是程序最终编译的可执行二进制代码(托管代码),类似于 Java ...
- CMake和Linux编程:find_package的使用
1.第一个CMake例子 在 t1 目录建立 main.c 和 CMakeLists.txt(注意文件名大小写): main.c 文件内容: //main.c #include <stdio.h ...
- VUE—打印(原生态网页打印)
//打印触发的方法 print(e){ let subOutputRankPrin = document.getElementById('printcode'); var options = { fo ...
- 第二章 函数和window对象
1.什么是函数函数相当于Java中的方法,每一个函数可以做一件事情,但是不属于某一个类 2.使用函数的好处:使代码模块化,功能分工明确,方便调用,思路功能清晰 3.函数的分类:(1)系统函数:系统提前 ...
- 分配swap分区
1.free命令 用来查看swap分区的使用情况[root@localhost ~]#free#查看内存与swap分区使用状况◆cached(缓存):是指把读取出来的数据保存在内存当中,当再次 读取时 ...
- 20190402Linux常用命令week1.1
Linux常用命令详解week1.1 基础命令:lsmanpwdcdmkdirechotouchcpmvrmrmdircatmorelessheadtailclearpoweroffreboot 命令 ...
- Node.js学习准备篇
这里写个Node.js 准备篇包含内容有node.js 的安装,命令行运行node.js 文件,使用webStrom 编写 node.js 时有提示功能,并用webStrom 运行 Node.js 其 ...