重定位shell
http://www.tldp.org/LDP/abs/html/io-redirection.html
http://unix.stackexchange.com/questions/20469/difference-between-21-output-log-and-21-tee-output-log (good)
http://linuxcommand.org/lts0060.php
2>&1 >output.log means first start sending all file handle 2 stuff (standard error) to file handle 1 (standard output) then send that to the file output.log. In other words, send standard error and standard output to the log file.
2>&1 | tee output.log is the same with the 2>&1 bit, it combines standard output and standard error on to the standard output stream. It then pipes that through the tee program which will send its standard input to its standard output (like cat) and also to the file. So it combines the two streams (error and output), then outputs that to the terminal and the file.
The bottom line is that the first sends stderr/stdout to the file, while the second sends it to both the file and standard output (which is probably the terminal unless you're inside another construct which has redirected standard output).
I mention that last possibility because you can have stuff like:
(echo hello | tee xyzzy.txt) >plugh.txt
where nothing ends up on the terminal.
such as :
./.build_release/examples/re_id/re_identity.bin 2>&1 | tee train.log
重定位shell的更多相关文章
- [CSAPP-II] 链接[符号解析和重定位] 静态链接 动态链接 动态链接接口
1 平台 转http://blog.csdn.net/misskissc/article/details/43063419 1.1 硬件 Table 1. 硬件(lscpu) Architecture ...
- Linux pwn入门教程(10)——针对函数重定位流程的几种攻击
作者:Tangerine@SAINTSEC 本系列的最后一篇 感谢各位看客的支持 感谢原作者的付出一直以来都有读者向笔者咨询教程系列问题,奈何该系列并非笔者所写[笔者仅为代发]且笔者功底薄弱,故无法解 ...
- CTF丨Linux Pwn入门教程:针对函数重定位流程的相关测试(下)
Linux Pwn入门教程系列分享已接近尾声,本套课程是作者依据i春秋Pwn入门课程中的技术分类,并结合近几年赛事中出现的题目和文章整理出一份相对完整的Linux Pwn教程. 教程仅针对i386/a ...
- Windows PE第6章 栈与重定位表
第六章 栈与重定位表 本章主要介绍栈和代码重定位.站和重定位表两者并没有必然的联系,但都和代码有关.栈描述的是代码运行过程中,操作系统为调度程序之间相互调用关系,或临时存放操作数而设置的一种数据结构. ...
- Reverse Core 第二部分 - 16&17章 - 基址重定位表&.reloc节区
第16-17章 - 基址重定位表&.reloc节区 @date: 2016/11/31 @author: dlive 0x00 前言 这几天忙着挖邮箱漏洞,吃火锅,马上要被关禁闭,看书进度比较 ...
- IOAPIC重定位中断处理函数思路整理
因为小可并非硬件编程出身,汇编基础又比较差...所以刚开始理解利用IOAPIC重定位技术的时候相当困难. 何为IOAPIC? 首先,必须认识到它是一个硬件,可编程的硬件.我理解的它在整个流程中的作用如 ...
- ELF Format 笔记(十)—— 重定位(relocation)
ilocker:关注 Android 安全(新手) QQ: 2597294287 重定位就是把符号引用与符号定义链接起来的过程,这也是 android linker 的主要工作之一. 当程序中调用一个 ...
- [PE结构分析] 10.基址重定位
源代码如下: typedef struct _IMAGE_BASE_RELOCATION { DWORD VirtualAddress; DWORD SizeOfBlock; // WORD Type ...
- 小甲鱼PE详解之基址重定位详解(PE详解10)
今天有一个朋友发短消息问我说“老师,为什么PE的格式要讲的这么这么细,这可不是一般的系哦”.其实之所以将PE结构放在解密系列继基础篇之后讲并且尽可能细致的讲,不是因为小甲鱼没事找事做,主要原因是因为P ...
随机推荐
- px和em的区别
px和em的区别 2012-06-21 23:01:06| 分类: CSS|字号 订阅 在如今这个提倡可用性设计以及用户体验设计的网络时代,CSS也是要一同参与其中的.大部分人在CSS代码编写中总是 ...
- 一个Java递归程序
先来没事搜了一些面试题来做,其中一道:输入一个整数,求这个整数中每位数字相加的和? 思考:1.如何或得每一位数:假如是1234, 1234%10=4,得到个位:(1234/10)%10=3得到十位 ...
- Java如何将控制台上的结果保存到文件
无论是二进制数据还是字符数据(文本数据),都可以用文件输出流java.io.FileOutputStream,以字节流的方式保存到指定文件. package test; import java.io. ...
- 为不同浏览器创建XMLHttpRequest对象
/*声明一个XMLHttpRequest对象*/ var xmlHttp=false; /*@cc_on@*/ /*if(@_jscript_version>=5) try { xmlHttp= ...
- js 获得每周周日到周一日期
//得到每周的第一天(周日)function getFirstDateOfWeek(theDate){ var firstDateOfWeek; theDate.setDate(theDate.get ...
- easy_install jinja2 mac linux
error: can't create or remove files in install directory The following error occurred while trying t ...
- iOS通过openURL打开原生应用与页面(包括电话,短信,safari等)
[[UIApplication sharedApplication] openURL:url];通过给url不同的值,可以实现调用系统自带 电话/短信/邮箱/浏览器/... 1.调用 电话phone[ ...
- 高效前端优化工具--Fiddler入门教程
简介: Fiddler是用C#编写的一个免费的HTTP/HTTPS网络调试器.Fiddler是以代理服务器的方式,监听系统的网络数据流动英语中Fiddler是小提琴的意思,Fiddler Web De ...
- Oracle异常处理内容,隐式游标
异常处理 create or replace procedure pr_test3(v_bh in varchar2,v_xx out t_hq_ryxx%rowtype) is begin sele ...
- FOJ 2105 Digits Count
题意:对一串数字进行抑或某数,和某数,或某数,统计某区间和的操作. 思路:因为化成二进制就4位可以建4颗线段树,每颗代表一位二进制. and 如果该为是1 直接无视,是0则成段赋值为0: or 如 ...