ubuntuでnodeサーバ環境を導入-番外(bash|vim|chmod)

1779 ワード

ふろく

  • bash操作
  • vim操作
  • httpステータスコード
  • chmod権限
  • bash

    ls
    ls -a
    ll
    ll -a
    cd 
    cd .
    cd ..
    cd /
    cd /etc
    cd ~/.ssh
    mkdir  # new dir
    touch  # new file
    
    cat                 # 
    mv file1 file2      #move 
    cp file1 file2     #copy file1 -> file2
    pwd     # print working directory
    whoami  # who am i
    rm file1    #remove
    rm -rf file2
    -d     --directory      #  ( ) 
    -f     --force          # , 。 dir
    -r/R   --recursive      # 
    -i     --interactive    # 
    tar zcvf test.tar.gz test   # 
    tar xvf test.tar.gz         # 
    -c # 
    -x # 
    -f # 
    -v # 
    -z #  gzip  
    scp patha pathb # 
    > # 
    >> # 

    Vim

    vi  #  ||  
    i   # 
    Esc # 
    wq! # 
    q!  # 

    httpステータスコード

    100 //  , ~
      
    200 // OK
    
    301 // Moved Permanently ( )
    302 // Found ( )
    304 // Not Modified 
    
    400 // Bad Request ( )
    401 // Unauthorized ( )
    403 // Forbidden ( )
    404 // Not found ( )
    
    500 // internal service error ( )
    502 // bad gateway ( )
    504 // gateway timeout error ( )

    chmod権限

    3桁の数字で構成され、各数字は3種類の権限(読み取り、書き込み、操作)を表します.
    1  
    2  
    3  
    0   
    1   
    2   
    4   
    3  2+1   &  
    5  4+1   &  
    6  4+2   &  
    7  4+2+1   &   &  

    トップレベルの権限777:任意のユーザーが読み書き可能chmod 777 filename600を挙げる:所有者は読み書き可能で、同グループと他のユーザーは権限がありません
    完了