Linuxノート01---linuxとフォルダ/ファイルの削除変更コマンドを認識する

4037 ワード

1.Linuxを知る
 linux         ,       ‘ / ’    

 ‘ / ’           :
                 .bin :           
                 .boot :               ,      
                 .dev :       ,  ,  
                 .etc :     ,    
                 .home :       ,          
                 .lib :                         
                 .mnt :             ,u         ,        
                 .opt :         
                 .proc :        ,              
                 .root : Linux      root    
                 .sbin :             (       )
                 .tmp :       ,            
                 .usr :              
                 .var :          
  :                   ,           

2.共通のショートカットキー(SecureCRT)
tab :        
ctrl + c :      (          )
ctrl + l :      
ctrl + shift + c :  
ctrl + shift + v :  
alt +b :  connect  (         IP)
alt + 1/2/3 ... :      

3.Linux端末コマンド
01.        :command [-options] [parameter]
command:   ,                
options:  ,           ,      
parameter:       ,     ,      

02.        

      1.     
        :mkdir    
                 mkdir -p   1/  2/... (       )
        :                       
        :mkdir dir1
                 mkdir dir1/dir2/dir3...
            
      2.     
        :rm    (     )
                 rm -f    (    )
                 rm -rf    (    )
                 rm -rf    (*        ?       [abc]  abc   )
                 rm -rf dir6* (   dir6     )
                 -r  recursive    ,  
                 -f  force    

      3.     
        :mv            
                 mv        
                  :            
        :mv  /opt/dir1  /opt/dir111 (   )
                 mv  /opt/dir1  /opt/dir2/dir222(         )

      4.     
        :ls      (     ,     )
                 ll       (    ,     )

                ls   ll           




03.       

      1.    
        :touch    (     ,        ,      )
                 echo ‘abc’ >    (         ,       )

       :touch test01.txt
                echo 'abc' > test02.txt
      2.    
        :rm   (     )
                 rm -f   (    )
                 rm -rf   (    )
                 rm -rf    (*        ?       [abc]  abc   )
                 rm -rf dir6* (   dir6     )
                 -r  recursive    ,  
                 -f  force    

      3.    
        :mv          
                 mv        
                  :           
        :mv  /opt/test01.txt  /opt/test111.txt (   )
                 mv  /opt/test01.txt  /opt/dir2/test666.txt(        )

      4.    
        :ls      (     ,     )
                 ll       (    ,     )
                
                **    **
                -a      all               
                -l                    ll  
                -h                  -l              

           x   
        :head       head -10    (      10   )
        :head  test01.txt 
                 head  -10  test01.txt
                 -x     x 

           x    
        :tail          tail  -10          tail  -f     
        :tail  test01.txt
                 tail  -10  test01.txt
                 -x     x 

            
        :more     
        :more  test01.txt

              
        :cat     
          :-n          
                        -b              (    )

          
        :grep          
        :grep  'aaa'  test.txt        
          :-n               
                        -i                   
                        -v         **     **    
                        ^a          ‘ a ’       
                        a$          ‘ a ’       

         
   command  --help   (      command         )

4.その他のコマンド
01.       
  :echo ' zzz ' >>    
  :echo ‘ zzz ’ >> test.txt      

02.    ( )
  :cp             (      )

03.&&   || 
  :  1  &&    2  (   1               2 )
             1  ||    2 (      1         2 )


    :||              |  (   )