RHE考试复习

下午考试,现在一边复习一边写,没有详细介绍,适合熟悉linux操作的同类菜鸟。

1. history

 history n

 !!

 !$

 !c

 !num

 !?abc

 !-n


2.ls -a

 ls -l

 ls -R

 ls- ld


3. rm -i 

 rm -r

 rm -f


4.chown

 u,g,o

 +,-

 r,w,x

 -R  #Recursive

 -v  #verbose

 --reference #chmod --reference file1 file2

 chmod 

 chgrp user1 file;chgrp user2 file  #chgrp user1:user2 file


5.echo 

 $(command)

 ${variable} = $VARIABLE


6.PS1    PS1="\u@\h:\w<\!>\$"

 \u

 \h

 \w

 \!

 \$


7.>   #STDOUT

 2>   #STDERR

 &>   #ALL OUTPUT

 2>&1   #redirect STERR to STDOUT

 ()    #combine STDOUTs

 > direct

 >> append


8.less

 mail    #mail -s ""some message"  username@example.com <<END

 lpr


9. tr 'A-Z' 'a-z'   #uppercase to lowercase

  #tr 'A-Z' 'a-z' < file


10.for n in{1,2};do

         ...

     done


11.seq NUM    #print zero to NUM

     seq NUM TO_NUM  #print NUM to TO_NUM


12. cat

  -A

  -s

  -b


13. less

 b

 k

 space

 ENTER

 g

 G

 /text   #search

 n

 N 

 q   #exit

 v   #open file in (vi by default)


14.head  file    #default 10 lines

     head -n NUM file

     tail file  

     tail -n NUM file

     tail -f file #continute to show update


15.grep 

     -i

     -n

     -v

     -Ax

     -Bx

     -r

     --color


16. wc     #text stats -l -w -c -m

      sort

      diff

      aspell

  


17.cut   

     -d

     -f 

     -c


18. sort 

     sort  file | uniq     #means sort -u

    -d

    -c

    -sn  -fn


19.aspell

     aspell check file

     aspell list < file


20.look WORD   # a quick spelling dictionnary look-up

     

21.tr  #translate

     sed   #stream editor

     sed   's/WORD1/WORD2/g' file   

           #  sed   '%s/WORD1/WORD2/g' file

     sed   '1,50s/WORD1/WORD2/g' file

     sed   '/digby/,/duncan/s/WORD1/WORD2/g' file

     sed  -e   '  '  -e   '  '  file

     sed -f SAVEFILE file


22. ^ $ [xyz] [^xyz] 

      #  grep '^rain' file

      #grep 'false$' file

2点半倒计时,387页只看到了187,不笔记了!!










  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值