vim anaconda-ks.cfg
cd /proc/
lsps aux|grep vim
cd /proc/53170
lscd fd
ll
覆蓋追加set -c 禁止覆蓋 set +c 允許覆蓋
stdout重定向ll /dev/null 垃圾箱2> stderr重定向
&> 所有輸出
| file 強制覆蓋
ls /boot /dir > /root/all2.log 2>&1 把錯的也放到裡面
ls /boot /dir 2> /root/all2.log 1>&2
(cal 08 2008;cal 08 2018) > /data/cal.txt
bc < f1.txt > bc.log
cat 把輸入的輸出出來
* tr命令:轉換和刪除字元
tr 'a-z' 'a-z'
tr 'a-z' 'a-z' < /etc/issue > f1.txt
cat f1.txt
tr -d 'abc'
abfecadc
tr -dc '0-9'
tr -s 'ab' 連續字元壓縮
aabb
whowho > who.log
tr -s " " < who.log
tr -s " " + < who.log
tr '\n' ' ' < f2.txt
here文件 here doc EOF重定向
here文件 here doc eof重定向 在shell指令碼程式中,向一條命令傳遞輸入的一種特殊方法是使用here文件。一個here d...