5, 使用命令行 重定向

1, alias

To see all the aliases defined in the environment, use the alias command without argu- ments.

2, type

3, info

1,type

2, help   

help cd

3, whatis

Display One-line Manual Page Descriptions

4, info 

 

4, 重定向

旧版shell

ls -l /bin/usr > ls-output.txt 2>&1

新版shell

ls -l /bin/usr &> ls-output.txt

use the single notation &> to redirect both standard output and stan- dard error to the file ls-output.txt

追加

ls -l /bin/usr &>> ls-output.txt

 

ls -l /bin/usr 2> /dev/null   不需要的时候,可以使用 /dev/null

5, 利用cat合并多个文件

cat movie.mpeg.0* > movie.mpeg
Since wildcards always expand in sorted order, the arguments will be arranged in the cor- rect order.

6, wc

[me@linuxbox ~]$ wc ls-output.txt

7902 64566 503634 ls-output.txt

In this case, it prints out three numbers: lines, words, and bytes contained in ls-out- put.txt.

7, tee

tee – Read from Stdin and Output to Stdout and Files

ls /usr/bin | tee ls.txt | grep zip

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值