linux shell 命令
来源:互联网 发布:淘宝答题抢红包 编辑:程序博客网 时间:2024/06/03 16:28
在学习PostgreSQL时,有下面一个命令:
$ postgres -D /usr/local/pgsql/data >logfile 2>&1 &
文件描述符1表示标准输出
文件描述符2表述标准错误
File descriptor 1 is the standard output (stdout).
File descriptor 2 is the standard error (stderr).
Here is one way to remember this construct (although it is not entirely accurate): at first, 2>1 may look like a good way to redirect stderr to stdout. However, it will actually be interpreted as “redirect stderr to a file named 1”. & indicates that what follows is a file descriptor and not a filename. So the construct becomes: 2>&1.
参考:
https://stackoverflow.com/questions/818255/in-the-shell-what-does-21-mean
| 是管道符号 表示前面的命令结果作为后面的命令输入
管道命令(pipe)的详细介绍
linux shell 管道命令(pipe)使用及与shell重定向区别
0 0
- Linux shell命令提示符
- linux shell 命令集
- Linux Shell命令集锦
- Linux Shell命令集锦
- Linux Shell 命令详解
- Linux常用shell命令
- Linux常用shell命令
- linux shell 基本命令
- Linux Shell 命令 简介
- linux shell - 命令使用
- Linux Shell 命令(-)
- linux shell管理命令
- Linux脚本Shell命令
- linux shell awk 命令
- Linux Shell Test 命令
- Linux Shell 命令
- linux shell命令笔记
- linux中shell命令
- ASO优化
- VC++60 第十五章 多文档界面的程序
- 勾选和不勾选菜单的解决方案
- Livy 安装使用说明
- 学习Android
- linux shell 命令
- VC++60 第十六章 VC++开发工具和MFC基础类库(一)
- 删除系统菜单的解决方案
- 几种阻塞队列介绍
- go语言环境搭建及vim高亮设置
- PAT 1034. Head of a Gang
- MySQL重置密码
- WM_INITPOPUPMENU消息
- HihoCoder 1078 线段树区间更新