Cheatography
                https://cheatography.com
            
        
        
    
                   
                            
    
                    Basic linux command line cheet sheet for testers
                    
                 
                    
        
        
            
    
        
                                    This is a draft cheat sheet. It is a work in progress and is not finished yet.
                    
        
                
        
            
                                
            
                
                                                | Reading logs
                        
                                                                                    
                                                                                            |  |  | shows the end of file |  
                                                                                            |  |  | display desired (300) number of rows |  
                                                                                            |  |  | display real time file updates |  
                                                                                            | example | $ tail -n 300 console.log
 | display 300 rows from the bottom |  
                                                                                            |  |  
                                                                                            |  |  | shows the top of file |  Integration test
                        
                                                                                    
                                                                                            |  |  | service avialability |  
                                                                                            |  |  
                                                                                            |  |  | check ports |  
                                                                                            | example |  
                                                                                            |  | telnet checkip.dyndns.org 80
 |  |  | Global search
                        
                                                                                    
                                                                                            |  |  | Globally search for a |  
                                                                                            |  |  | Regular expression and |  
                                                                                            |  |  | Print matching lines |  
                                                                                            |  |  | registerless search |  
                                                                                            |  |  | full word match |  
                                                                                            |  |  | check number of matches |  
                                                                                            |  |  | search in subdirectory |  
                                                                                            |  |  | inversion search |  
                                                                                            |  |  | enumerate lines |  
                                                                                            |  |  | display names |  
                                                                                            | `-e [pattern] [file] |  | several search patterns |  
                                                                                            | example | `$ grep -e [pattern1] |  
                                                                                            |  | -e [pattern2] |  
                                                                                            |  | -e [pattern3] |  
                                                                                            |  | ...[file]` |  DB access
                        
                                                                                    
                                                                                            |  |  | connect to the DB (utility) |  
                                                                                            |  |  | host of DB |  
                                                                                            |  |  | user for DB login |  
                                                                                            | example | $ psql -h localhost -U <user>
 |  Working with URL
                        
                                                                                    
                                                                                            | $ curl <option> <link>
 |  | utility to work with URL |  
                                                                                            |  |  | display page content in the file |  
                                                                                            |  |  | display page content in the file, with server file name |  
                                                                                            |  |  
                                                                                            | example |  |  
                                                                                            |  |  
                                                                                            |  | -d "<GET parameters>"<URL>
 | perform GET request |  
                                                                                            |  |  
                                                                                            | example |  curl -d "field1=val&fileld2=val1"http://posttestserver.com/post.php
 |  |