Where to find and how to handle log files.?

Message
Author
Jakob77
Posts: 661
Joined: Thu Feb 09, 2023 3:09 am

Where to find and how to handle log files.?

#1 Post by Jakob77 »

Welcome to a free discussion about log files. :-)



Here is one so common that even I know it:

Code: Select all

~/.bash_history

A history of commands used in Terminal, and we can restore them one by one just by using arrow up.
My mind is not made up yet. I like it a lot but I might choose to change it for safety reasons.
I feel sure the file can just be erased but if I decide I might choose instead to replace the content.

Not a problem but perhaps something to think about.
How much history log do we want to keep by default.
I have tracked my way down to this file where I really dislike the default, and I just want to get rid of it:

Code: Select all

~/.local/share/recently-used.xbel

It saves a list of the last used documents, and I don't think that is anybody's business. Not even my own. lol

I am thinking about handling it like this in a session script to clear it before the user logs out:


If

Code: Select all

~/.local/share/recently-used.xbel
exists, then change its content to one empty line:


Code: Select all

#!/bin/bash
            if [ -f "$HOME/.local/share/recently-used.xbel" ] ; then

            echo "" > $HOME/.local/share/recently-used.xbel ;
fi
I suppose it might be safest if the file is always there but I could perhaps just erase it or create a new empty file to overwrite it. - What is best.?






And here is a lot more log files:

Code: Select all

/var/log/
Maybe I also ought to examine all them to see if there are privacy violation going on. ;-)

I would like to know a little more about what you use those log files for.
What is on your mind about them. Some more worth mentioning than others.?



Do we have other places with interesting log files.? :-)

Charlie Brown

Re: Where to find and how to handle log files.?

#2 Post by Charlie Brown »

QSI is also an easy way to get them, though this was not the question exactly.

Jakob77
Posts: 661
Joined: Thu Feb 09, 2023 3:09 am

Re: Where to find and how to handle log files.?

#3 Post by Jakob77 »

Yes, but filtered (all from log files?). There has to be more strict criteria for the output we tell people to expose in forum. And I have never seen a problem.
But still also locally I think we ought to be able to trust the computer when we delete a file.
If I for instance write a file "Monster_Sergent_Uglyname.txt", and the guy becomes dictator next week I might then want to delete it, and afterwards I don't want the file name to be saved in a log file just one click away. Is that understandable.? ;-)

Am I the only one who thinks that Firefox has some bad log defaults.?
In general log files can be smart and good to learn from but I would like to reverse the tend that takes privacy away by default.

User avatar
Jerry3904
Administrator
Posts: 23640
Joined: Wed Jul 19, 2006 6:13 am

Re: Where to find and how to handle log files.?

#4 Post by Jerry3904 »

The Quick System Info GUI now has almost all of them available.
Production: MX-23 Xfce, AMD FX-4130 Quad-Core, GeForce GT 630/PCIe/SSE2, 16 GB, SSD 120 GB, Data 1TB
Personal: MX-25 Fluxbox, ThinkPad X1 Carbon gen 9 with i7
Other: Raspberry Pi 5 with MX-23 Xfce Raspberry Pi Respin

Jakob77
Posts: 661
Joined: Thu Feb 09, 2023 3:09 am

Re: Where to find and how to handle log files.?

#5 Post by Jakob77 »

Where do we find "Quick System Info GUI".? :-)





Ideas to some good standard Terminal commands to plant for users in

Code: Select all

~/.bash_history
?

I can't really think of any. Maybe this one:

Code: Select all

firefox --new-window 'https://mxlinux.org/' --new-window 'https://mxlinux.org/wiki/system/iso-download-mirrors/#checksumsignatures' --new-window 'https://endoflife.date/mxlinux'

User avatar
Eadwine Rose
Administrator
Posts: 15352
Joined: Wed Jul 12, 2006 2:10 am

Re: Where to find and how to handle log files.?

#6 Post by Eadwine Rose »

Menu.
MX-23.6_x64 July 31 2023 * 6.1.0-40amd64 ext4 Xfce 4.20.0 * 8-core AMD Ryzen 7 2700
Asus TUF B450-Plus Gaming UEFI * Asus GTX 1050 Ti Nvidia 535.247.01 * 2x16Gb DDR4 2666 Kingston HyperX Predator
Samsung 870EVO * Samsung S24D330 & P2250 * HP Envy 5030

Jakob77
Posts: 661
Joined: Thu Feb 09, 2023 3:09 am

Re: Where to find and how to handle log files.?

#7 Post by Jakob77 »

Eadwine Rose wrote: Fri Oct 13, 2023 8:09 amMenu.
What kind.? :-)

You made me write "Menu --help" in Terminal. LOL

Actually I have been thinking about why ~/bin is not developed just a little more for MX users to start with. If it is done, then a prepared command for a menu about it in Terminal could perhaps be a great way to go.

User avatar
Eadwine Rose
Administrator
Posts: 15352
Joined: Wed Jul 12, 2006 2:10 am

Re: Where to find and how to handle log files.?

#8 Post by Eadwine Rose »

Are you pulling my leg or what?

The menu. In that corner, click the mouse button, something comes up that holds all the program thingies, it's in that thing.
MX-23.6_x64 July 31 2023 * 6.1.0-40amd64 ext4 Xfce 4.20.0 * 8-core AMD Ryzen 7 2700
Asus TUF B450-Plus Gaming UEFI * Asus GTX 1050 Ti Nvidia 535.247.01 * 2x16Gb DDR4 2666 Kingston HyperX Predator
Samsung 870EVO * Samsung S24D330 & P2250 * HP Envy 5030

User avatar
siamhie
Global Moderator
Posts: 3835
Joined: Fri Aug 20, 2021 5:45 pm

Re: Where to find and how to handle log files.?

#9 Post by siamhie »

Jakob77 wrote: Thu Oct 12, 2023 10:30 am Here is one so common that even I know it:

Code: Select all

~/.bash_history

A history of commands used in Terminal, and we can restore them one by one just by using arrow up.
My mind is not made up yet. I like it a lot but I might choose to change it for safety reasons.
I feel sure the file can just be erased but if I decide I might choose instead to replace the content.

Not a problem but perhaps something to think about.
How much history log do we want to keep by default.


This is what I have added to my .bashrc file. You can make adjustments to your liking.

Code: Select all

# save the last 5000 commands into memory 
HISTSIZE=5000

# save the last 10000 commands to disk 
HISTFILESIZE=10000

You can also open your bash history file and remove entries you don't want. Here I keep the 4 entries I use all the time.
.bash_history.png
You do not have the required permissions to view the files attached to this post.
This is my Fluxbox . There are many others like it, but this one is mine. My Fluxbox is my best friend. It is my life.
I must master it as I must master my life. Without me, my Fluxbox is useless. Without my Fluxbox, I am useless.

Jakob77
Posts: 661
Joined: Thu Feb 09, 2023 3:09 am

Re: Where to find and how to handle log files.?

#10 Post by Jakob77 »

Eadwine Rose

No, I thought you were answering about the Terminal.
About "Quick System Info GUI" I am beginning to guess it means the same as "QSI"



siamhie

Thank you very much for sharing your way.
When you work and test a lot of code in Terminal a long and well kept history log can sometimes make really good sense. :-)

Post Reply

Return to “Chat”