제로 기초 학습 클 라 우 드 컴 퓨 팅 및 빅 데이터 DBA 클 라 우 드 구조 사 [Linux 시스템 환경 및 권한 관리 2015 년 12 월 21 일 월요일]

26421 단어
  1 2015.12.21/Mon
  2 
  3 *************  **************
  4     
  5                   ls cd pwd
  6                     * ? { } |
  7                    --help help type man info /usr/share/doc
  8                touch mkdir rmdir cp rm mv 
  9               cat tac head tail more less 
 10                       vi vim echo grep cut wc file 
 11                  cal date timedatectl hwclock
 12 
 13 
 14 
 15 
 16 
 17 
 18 
 19 **********techer:Carol [email protected]**********
 20   1.6    network:172.25.254.0/24
 21   2.     ip  ,X     :
 22        rhel6 172.25.x.11
 23        rhel7 172.25.x.10
 24   3.        ,  :ssh root@ip 
 25                         password:uplooking
 26 
 27 **********    **********
 28 1.     :
 29            
 30      :    、    ;
 31     :-     --       
 32     :        ,     ,           
 33 
 34 2.       
 35 
 36 3.     
 37   # root  
 38   $     
 39   [     @        ]
 40              
 41 
 42 **********     **********
 43 1.ls:list                
 44     -l:long                    
 45          
 46           <=255   
 47     -d:directory               
 48                bites
 49     -h:             
 50                           
 51        du -sh /etc<==  etc       
 52      -a:        .     
 53      -R:      
 54       #   ls          
 55      -b:      \  
 56 
 57 2.cd:change directory       
 58    cd   
 59         
 60  61  62  63            .    
 64            ..     
 65            -         
 66 
 67 3.pwd:print working directory             
 68 
 69 
 70 **********          **********
 71 1.touch [filename] <== 72        50       ,  text1-text50?
 73         
 74   touch test{1..50} 
 75   touch test{a..e}
 76   touch test{a..e}_{1..3}--->   a_1 a_2 a_3...
 77       ,             。
 78   touch ""          
 79   state         ctime\mtime\atime
 80 
 81 2.rm [filename]<==remove    , root     ,        
 82   rm -f [filename]<==force    ,root   
 83   rm -i [filename]<==          
 84 3.    * 
 85         ?
 86         ??
 87   rm -f *1
 88   rm -f 1*
 89   rm -f 1*1
 90   rm -f test?<==   test          
 91 
 92 4.mkdir:make directory    
 93   mkdir -p /test/test1<==      
 94   mkdir {a..e}<==  a-e   
 95   touch {a-e}/file{1..4}<== a-e      file1-file4  
 96 
 97 5.rmdir:remove directory    
 98  99 
100   rm -rf [d_name]<==       
101 
102 6.cp:copy    
103   cp        (  )
104   -p        
105   -r     
106 
107 7.mv:move  
108   mv        (  )
109         
110 
111 
112 
113 
114   
115 **********    **********
116 1.--help     
117 2.help          
118 3.type [  ]       or    
119 4.man []
120       、  ,    ,    (/name)
121   man [  ] [name]
122        8 
123   man -k passwd<==  passwd      
124 5.info []
125      
126 6./usr/share/doc      ,                    
127 
128 
129 
130 **********           **********
131 
132 ####     ####
133 1.cat      
134   -n     
135 2.tac      
136   cat、tac         
137 3.head       ,  10 
138   -n     
139 4.tail       ,  10 
140   -n     
141   tail -n 5 /tmp/stu
142   tail -n5 /tmp/stu
143   tail -5 /tmp/stu
144   -f         
145 5.more      ,   space   ,b    ,enter   
146   cat       
147 6.less  more         /[      ]
148   N    
149   n    
150   q  
151 
152 ####     ####
153 1.LibreOffice .odt       windows office
154 2.gedit    windows    
155 3.vim 
156        
157            
158       
159 4.echo        
160   echo xxx > file  xxx  file  ,       
161   echo xxx >> file  file    xxx
162 
163 ####     ####
164 1.grep    
165   grep [OPTIONS] PATTERN [FILE...]
166       
167   grep [   ] [  ]<==    [   ]  
168   grep [^   ] [  ]<==   [   ]     
169   grep [   $] [  ]<==   [   ]     
170      grep ^root /etc/passwd<==   root     
171      grep bash$ /etc/passwd<==   bash     
172   grep -v [   ] [  ]--->173 2.cut    
174   cut -d"   "(       ) -fn(   ) [  ]
175   cut -d":" -f2 /etc/resolv.conf
176 3.wc
177                 
178   -l      
179   -w, --words     
180   -c, -m,--bytes    
181 
182   [root@stu15 ~]# wc /etc/resolv.conf
183    4 11 98 /etc/resolv.conf
184 
185 **********  **********
186 1.|
187   output | input
188 189   ls -l /tmp | cut -d" " -f3
190   [root@stu15 ~]# ls -l /tmp | cut -d" " -f3 <==    /emp      ,       ,     
191   [root@stu15 ~]# ls -l /tmp | grep 2 | cut -d" " -f1<==    /emp      ,    “2”  ,        ,     
192 
193 
194 ####    ####
195 1.file        
196 
197 
198 **********  **********
199 1.date      
200   date "+%d" <==   21
201   date "+%D" <==   12/21/15
202   date "+%Y:%m:%d"<==   2015:12:21
203   -s     
204      date -s "2015-12-20 16:00:00"
205 2.hwclock  BIOS  
206     BIOS  
207   hwclock --systohc             ,      
208   hwclock --hctosys             ,      
209 3.timedatectl 
210    date       
211   rh7  

좋은 웹페이지 즐겨찾기