Page 1 of 1
Where to find and how to handle log files.?
Posted: Thu Oct 12, 2023 10:30 am
by Jakob77
Welcome to a free discussion about log files. :-)
Here is one so common that even I know it:
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:
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
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:
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.? :-)
Re: Where to find and how to handle log files.?
Posted: Thu Oct 12, 2023 11:12 am
by Charlie Brown
QSI is also an easy way to get them, though this was not the question exactly.
Re: Where to find and how to handle log files.?
Posted: Thu Oct 12, 2023 5:58 pm
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.
Re: Where to find and how to handle log files.?
Posted: Thu Oct 12, 2023 6:06 pm
by Jerry3904
The Quick System Info GUI now has almost all of them available.
Re: Where to find and how to handle log files.?
Posted: Thu Oct 12, 2023 8:01 pm
by Jakob77
Where do we find "Quick System Info GUI".? :-)
Ideas to some good standard Terminal commands to plant for users in
?
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'
Re: Where to find and how to handle log files.?
Posted: Fri Oct 13, 2023 8:09 am
by Eadwine Rose
Menu.
Re: Where to find and how to handle log files.?
Posted: Fri Oct 13, 2023 2:24 pm
by Jakob77
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.
Re: Where to find and how to handle log files.?
Posted: Fri Oct 13, 2023 2:26 pm
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.
Re: Where to find and how to handle log files.?
Posted: Fri Oct 13, 2023 3:04 pm
by siamhie
Jakob77 wrote: Thu Oct 12, 2023 10:30 am
Here is one so common that even I know it:
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
Re: Where to find and how to handle log files.?
Posted: Sat Oct 14, 2023 12:51 pm
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. :-)
Re: Where to find and how to handle log files.?
Posted: Sat Oct 14, 2023 1:40 pm
by Charlie Brown
Jakob77 wrote: Sat Oct 14, 2023 12:51 pm... guess it means the same as "QSI" ...
Yes. "The current QSI".
You know previously it was running in a terminal and the command was
quick-system-info-mx (still valid) which had just the qsi (not the log files etc.)
Then
quick-system-info-gui was done , that's why they called it QSI - gui, which's actually just the QSI now :)
Re: Where to find and how to handle log files.?
Posted: Tue Oct 17, 2023 4:01 am
by Jakob77
Yes. It is a good thing that we can see a list of log files in the QSI graphical user interface.
Before I started with MX I didn't know about the log files.
That is why I am curious about them, and what the users are using them for.
Like I expected, it is mostly technical important information for solving technical problems, and there is something to learn about the system by reading them.
I make my own log files about login, updates and snapshots, so I also wonder how much of that is a waste because the most important information already is logged by default. I guess at least saving the full log from snapshots every time is a waste, mostly because it is so long and of so little interest that nobody ever wants to read it.