码迷,mamicode.com
首页 >  
搜索关键字:shell memcache printf    ( 45225个结果)
tmp = 2/4;竟然没有发现的
我还纠结着单目运算符和双目运算符和乘除的一些优先级什么事情。 #include "common.h" #include <stdio.h> #include <stdlib.h> #include <math.h> //#define static float Mathematical_modeli ...
分类:其他好文   时间:2020-02-27 19:03:13    阅读次数:59
liunx 使用crontab定时任务+shell脚本删除tomcat日志elasticsearch日志索引
由于过多的日志很占用磁盘空间,今天经理让我写一个脚本删除多余的日志、和es索引 定时删除试根据crontab+shell脚本实现的 crontab配置目录 /var/spool/cron/ 该目录下存放的是每个用户(包括root)的crontab任务,文件名以用户名命名 /etc/cron.d/ 这 ...
分类:系统相关   时间:2020-02-27 19:01:37    阅读次数:95
golang调用shell命令标准输出阻塞管道
package tools import ( "bufio" "errors" "fmt" "github.com/Sirupsen/logrus" "go.pkg.okcoin.com/devops/agent/internal/constant" "os/exec" "strings" ) /* ...
分类:系统相关   时间:2020-02-27 15:58:43    阅读次数:154
shell 判断文件内容是否改变
判断文件内容是否改变: 1)md5值判断 2)diff 判断 #添加日志时间戳 function fn_showlog() { local curtime; curtime=`date +"%Y%m%d-%H:%M:%S"` echo "$curtime $1"; } #判断文件内容是否一致 fun ...
分类:系统相关   时间:2020-02-27 15:58:28    阅读次数:138
类Unix环境变量配置
环境变量配置文件 MacOS Linux 如果shell的类型是zsh时,还会存在 和`~/.zshrc`。 其中 ,`/etc/paths /etc/bashrc /etc/profile /etc/paths /etc/bashrc`在bash shell执行时,会读取该文件。 MacOS默认用 ...
分类:其他好文   时间:2020-02-27 14:37:14    阅读次数:73
C语言 汇编了解
C语言 汇编语言 一、C语言 创建变量计算值 #include <stdio.h> int main(void) { // 数据类型 int a = 10; int b = 20; // 计算a+b int c = a + b; printf("%d\n",c); return 0; } 二、C语言 ...
分类:编程语言   时间:2020-02-27 13:21:13    阅读次数:62
md5sum|zip|
##move## for((i=1;i<=22;i++));do cp combine_all.split_$i split_$i;done ##gzip## mkdir gzip/workshell for((i=1;i<=22;i++));do echo "gzip split_$i"> spl ...
分类:其他好文   时间:2020-02-27 13:12:40    阅读次数:60
用C语言写简单的交换机(三)
#include <stdio.h> int main(void) { char name[32]; //字符数组 char password[16]; printf("请输入用户名: "); scanf("%s",&name); printf("请输入密码: "); scanf("%s",&pas ...
分类:编程语言   时间:2020-02-27 13:12:25    阅读次数:100
linux之shell中的变量
一、变量 在myshell.sh中输入 执行: 使用set指令可以查看当前shell下的所有变量。 在myshell.sh中输入: 执行: 使用unset可以撤销一个变量。 使用readonly声明静态变量,不可以撤销该变量:readonly A=99 比如: 二、设置环境变量 在/etc/prof ...
分类:系统相关   时间:2020-02-27 12:57:09    阅读次数:73
[shell] shell 变量生命周期, source, export
1. shell 的派生 用户登录到Linux系统后,系统将启动一个用户shell。在这个shell中,可以使用shell命令, 或声明变量,也可以创建并运行shell脚本程序。运行shell脚本程序时,系统将创建一个子shell。 此时,系统中将有两个shell,一个是登录时系统启动的shell, ...
分类:系统相关   时间:2020-02-27 11:34:48    阅读次数:111
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!