User Tools

Site Tools


tipsandtricks:others

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
tipsandtricks:others [2021/11/16 12:21] patriktipsandtricks:others [2023/09/29 07:01] (current) – external edit 127.0.0.1
Line 2: Line 2:
 [[sections:tipsandtricks|<= Back]] [[sections:tipsandtricks|<= Back]]
  
-====== How to read logs in *nix cli ====== +====== Other tips and tricks ====== 
-This is mostly based on the bash terminal but should be more application (less, tail and so on) than the specific terminal.\\ +// 
-This is also how i use the application listed below to read logs and to troubleshoot. +by Patrik Hermansson 
- +//
-  * [[others#Remove Terminal history| Remove Terminal history ]] +
-  * [[others#Tail | Tail ]] +
  
  
  
 +  * [[others#Remove Terminal history| Remove Terminal history ]]
  
  
 +=== Remove Terminal history ===
 In Bash (the terminal) the commands are saved in the .bash_history file. If you write usernames and passwords in the terminal those are saved as commands in that file. In clear text! In Bash (the terminal) the commands are saved in the .bash_history file. If you write usernames and passwords in the terminal those are saved as commands in that file. In clear text!
 Password without echo (when you do not see the text) are not saved. Only the character that you see.  Password without echo (when you do not see the text) are not saved. Only the character that you see. 
Line 19: Line 18:
       history -c       history -c
       history -w       history -w
--c == clear the history list by deleting all entries. + 
--w == writes over the .bash_history file with the empty list thereby clearing it.+  The flag -c == clear the history list by deleting all entries. 
 +  The flag -w == writes over the .bash_history file with the empty list thereby clearing it. 
 The commands you write in the active (open) window will be saved in memory and written in the file on exit/logout. You can see all commands in “memory” by using the command history without any flags. The commands you write in the active (open) window will be saved in memory and written in the file on exit/logout. You can see all commands in “memory” by using the command history without any flags.
 +
  
tipsandtricks/others.1637065287.txt.gz · Last modified: 2023/09/29 07:01 (external edit)