Linux重定向程序:指令+数据读入数据:Input输出数据:Output打开的文件都有一个fd:filedescriptor(文件描述符)Linux给程序提供三种I/O设备标准输入(STDIN)0默认接受来自键盘的输入标准输出(STDOUT)1默认输出到终端窗口标准错误(STDERR)2默认输出到终端窗口[root@localho..
分类:
系统相关 时间:
2016-08-29 22:51:34
阅读次数:
450
#include<stdio.h>int a[100];int main(){ int i,j,n,t=0,f; freopen("random.in","r",stdin); freopen("random.out","w",stdout); scanf("%d",&n); for(i=1;i<= ...
分类:
其他好文 时间:
2016-08-28 16:12:55
阅读次数:
107
### direct log messages to stdout ###log4j.appender.stdout=org.apache.log4j.ConsoleAppenderlog4j.appender.stdout.Target=System.outlog4j.appender.stdou ...
分类:
数据库 时间:
2016-08-27 20:42:25
阅读次数:
163
#include<stdio.h>int main(){ int a[1000],n,t; freopen("random.in","r",stdin); freopen("random.out","w",stdout); scanf("%d",&n); for(int i=0;i<=n-1;i++ ...
分类:
其他好文 时间:
2016-08-27 20:36:28
阅读次数:
166
1、开发IDE,我使用的是PyCharm。 2、运行原理 使用python写MapReduce的“诀窍”是利用Hadoop流的API,通过STDIN(标准输入)、STDOUT(标准输出)在Map函数和Reduce函数之间传递数据。我们唯一需要做的是利用Python的sys.stdin读取输入数据,并 ...
分类:
编程语言 时间:
2016-08-26 12:04:09
阅读次数:
218
ELK中,主要关心logstash的配置,es只是作为存储容器。 2、rubydebug格式输出 ./bin/logstash -e 'input{stdin{}}output{stdout{codec=>rubydebug}}' 3、配置文件 输出到elasticsearch 配置项 input、... ...
分类:
其他好文 时间:
2016-08-26 10:25:46
阅读次数:
191
这两天要在服务器端一直运行一个Python脚本,当然就想到了在命令后面加&符号 $ python /data/python/server.py >python.log &说明: 1、 > 表示把标准输出(STDOUT)重定向到 那个文件,这里重定向到了python.log 2、 & 表示在后台执行脚 ...
分类:
编程语言 时间:
2016-08-20 17:39:52
阅读次数:
208
在Linux中,一切都是文件,除了文本文件、源文件、二进制文件等,一个硬件设备也可以被映射为一个虚拟的文件,称为设备文件。例如,stdin 称为标准输入文件,它对应的硬件设备一般是键盘,stdout 称为标准输出文件,它对应的硬件设备一般是显示器。对于所有的文件,都可以使用 read() 函数读取数 ...
分类:
其他好文 时间:
2016-08-20 16:10:20
阅读次数:
126
1、命令介绍: gzip用来压缩或解压文件,对文本文件的压缩率有60~70%。 2、命令格式: gzip [选项] 文件/目录 3、命令参数: -a或--ascii 使用ASCII文字模式。 -c或--stdout或--to-stdout 把压缩后的文件输出到标准输出设备,不去更动原始文件。 -d或 ...
分类:
系统相关 时间:
2016-08-16 00:33:34
阅读次数:
222