User Tools

Site Tools


tipsandtricks:others

This is an old revision of the document!


<== Back to menu
<= Back

How to read logs in *nix cli

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.

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. To clear the file from entries, do the following. (needs to be done in all open windows (cli logins) if more than one SSH session is active/logged in)

    history -c
    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 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.1637065228.txt.gz · Last modified: 2023/09/29 07:01 (external edit)