命令 >> 文件 2>&1

命令 &>> 文件
将标准输出与错误输出共同写入到文件中(追加到原有内容的后面)

# ll >>aaa 2>&1
root@test-W330-C30:~# cat aaa
总用量 3248
drwx------ 18 root root 4096 5月 18 19:35 ./
drwxr-xr-x 36 root root 4096 5月 18 14:41 ../
-rw-r--r-- 1 root root 49 5月 18 19:35 1
drwxr-xr-x 3 root root 4096 3月 22 15:52 3d-haiguang-zhaoxim/
-rw-r--r-- 1 root root 190 3月 22 15:58 3d-haiguang-zhaoxim.zip
drwxr-xr-x 2 root root 4096 5月 4 20:12 aa/
-rw-r--r-- 1 root root 0 5月 18 19:35 aaa
-rw-r--r-- 1 root root 50 3月 31 10:44 .applet
-rw------- 1 root root 23741 5月 18 13:12 .bash_history
-rw-r--r-- 1 root root 3106 10月 23 2015 .bashrc
drwxr-xr-x 2 root root 4096 5月 4 20:12 bb/
drwx------ 6 root root 4096 3月 31 10:44 .cache/
drwxr-xr-x 2 root root 4096 5月 4 20:12 cc/
drwx------ 11 root root 4096 3月 20 19:46 .config/
drwx------ 3 root root 4096 3月 20 19:43 .dbus/
drwxr-xr-x 2 root root 4096 3月 31 10:44 Desktop/
-rw-r--r-- 1 root root 15482 3月 20 19:46 .face
drwx------ 3 root root 4096 3月 20 22:27 .gnupg/
-rw-r--r-- 1 root root 132 3月 20 19:45 history
-rw------- 1 root root 1388 3月 31 10:43 .ICEauthority
-rw-r--r-- 1 root root 0 3月 31 10:43 .instance_kds.lock
-rw-r--r-- 1 root root 3146783 4月 10 09:28 klbios-4.1.4-KL2003251-test-A1927-nologo.fd
-rw------- 1 root root 36 5月 7 16:55 .lesshst
drwx------ 3 root root 4096 3月 20 19:46 .local/
drwx------ 4 root root 4096 3月 31 10:44 .mozilla/
drwx------ 2 root root 4096 3月 20 19:46 .presage/
-rw-r--r-- 1 root root 189 3月 13 22:09 .profile
-rw-r--r-- 1 root root 81 3月 31 10:46 .recentAppLog
-rw------- 1 root root 1024 3月 13 21:58 .rnd
drwxr-xr-x 2 root root 4096 3月 20 19:46 .sogouinput/
drwx------ 2 root root 4096 5月 15 12:35 .ssh/
-rw------- 1 root root 12409 5月 18 13:09 .viminfo
drwxr-xr-x 2 root root 4096 3月 31 10:43 .vnc/
-rw------- 1 root root 967 5月 18 19:35 .Xauthority
drwxr-xr-x 2 root root 4096 3月 20 19:46 桌面/
root@test-W330-C30:~# ll >>aaa 2>&1

shell脚本 在后台执行de 命令 >> 文件 2>&1 将标准输出与错误输出共同写入到文件中(追加到原有内容的后面)的更多相关文章

  1. 将make的输出(标准输出/标准错误输出)重定向到文件

    方式 描述符 含义 stdin 0 标准输入 stdout 1 标准输出 stderr 2 标准错误输出 1.想要把make输出的全部信息,输出到某个文件中 最常见的办法就是:make xxx > ...

  2. shell脚本介绍
 shell脚本结构和执行
date命令用法
 shell脚本中的变量

  3. shell脚本介绍、shell脚本结构和执行、date命令用法、shell脚本中的变量

    7月11日任务 20.1 shell脚本介绍20.2 shell脚本结构和执行20.3 date命令用法20.4 shell脚本中的变量 20.1 shell脚本介绍 1.shell脚本语言是linu ...

  4. Linux centosVMware shell脚本介绍、shell脚本结构和执行、date命令用法、shell脚本中的变量

    一. shell脚本介绍 shell是一种脚本语言 aming_linux blog.lishiming.net 可以使用逻辑判断.循环等语法 可以自定义函数 shell是系统命令的集合 shell脚 ...

  5. Linux Shell脚本入门--wget 命令用法详解

    Linux Shell脚本入门--wget 命令用法详解 wget是在Linux下开发的开放源代码的软件,作者是Hrvoje Niksic,后来被移植到包括Windows在内的各个平台上.它有以下功能 ...

  6. shell脚本编写步骤及其常用命令和符号

    1,什么是Shell     Shell 是kernel的一个外壳,是一个命令解析器,负责用户与内核的交互.2,Shell脚本     Shell脚本类似于批处理,可以方便的执行大量命令.3,编写sh ...

  7. jenkins 登录远程机器并执行脚本,脚本中有后台执行的程序无法执行解决方法。

    jenkins构建shell执行配置 在远程shell脚本中,需要后台执行的命令需要以$( )括起来

  8. 让shell脚本在后台飞

    1. 使用&符号在后台执行命令 你可以在Linux命令或者脚本后面增加&符号,从而使命令或脚本在后台执行,例如:. $ ./my-shell-script.sh & 2. 使用 ...

  9. Linux Shell脚本入门--cut命令

    Linux Shell脚本入门--cut命令 cut cut 命令可以从一个文本文件或者文本流中提取文本列. cut语法 [root@www ~]# cut -d'分隔字符' -f fields &l ...

随机推荐

  1. 【10.5NOIP普及模拟】sum

    [10.5NOIP普及模拟]sum 文章目录 [10.5NOIP普及模拟]sum 题目描述 输入 输出 输入输出样例 样例输入 样例输出 解析 code 题目描述 小x有很多糖果,分成了 N 堆,排成 ...

  2. Jmeter(四十二) - 从入门到精通进阶篇 - Jmeter配置文件的刨根问底 -番外篇(详解教程)

    1.简介 为什么宏哥要对Jmeter的配置文件进行一下讲解了,因为有的童鞋或者小伙伴在测试中遇到一些需要修改配置文件的问题不是很清楚也不是很懂,就算修改了也是模模糊糊的.更有甚者觉得那是禁地神圣不可轻 ...

  3. 实际使用Elasticdump工具对Elasticsearch集群进行数据备份和数据还原

    文/朱季谦 目录 一.Elasticdump工具介绍 二.Elasticdump工具安装 三.Elasticdump工具使用 最近在开发当中做了一些涉及到Elasticsearch映射结构及数据导出导 ...

  4. 201871030105-陈啟程 实验三 结对项目—《D{0-1}KP 实例数据集算法实验平台》项目报告

    项目 内容 课程班级博客 https://edu.cnblogs.com/campus/xbsf/2018CST 这个作业要求链接 https://www.cnblogs.com/nwnu-daizh ...

  5. ASP程序写的项目与微信服务号(公众号)完美结合。仅需一个DLL组建WeixinDLL

    因ASP程序开发有很多优点,早年间ASP风靡全球,因此如今还在继续运营的ASP开发的项目仍在运行着,但是随着社交网络不断发达,特别是微信支付.微信通讯.小程序等的出现,导致很多ASP项目对接起来就比较 ...

  6. 6- MySQL条件查询与通配符

    -数据库表中一般包含大量的数据,很少需要查询表中的所有行,通常只会根据特定的需要提取表中的一部分数据.这个时候需要制定查询条件,及过滤条件. -在select语句中,数据库根据where字句中指定的查 ...

  7. hdu2722 简单最短路,处理好输入就行

    题意:       从左上角走到右下角,有的最短时间,每段路径的长度都是2520,每段上都有自己的限制速度,方向. 思路:      直接写就行了,就是个最短路,权值是2520/限制,输入的时候细心点 ...

  8. LA3029最大子矩阵

    题意:       给你一个n*m的矩阵<每个格子不是'F'就是'R'>,让你找一个最大的'F'矩阵,输出他的面积*3. 思路:       比较经典的题目了,现在想起来比较好想,以前的话 ...

  9. poj2112 二分最大流+Floyd

    题意:      一个农场主有一些奶牛,和一些机器,每台机器有自己的服务上限,就是一天最多能给多少头奶牛挤奶,给你任意两点的距离,问你让所有的奶牛都被挤奶时,奶牛于机器最远距离的最近是多少. 思路: ...

  10. Docker用Commit给容器做快照

    关于 commit 镜像是容器的基础,每次执行 docker run 的时候都会指定哪个镜像作为容器运行的基础. 镜像是多层存储,每一层是在前一层的基础上进行修改:而容器同样也是多层存储,是在以镜像为 ...