You are not logged in.
Pages: 1
Considering that, for troubleshooting, history of commands performed are way more useful than other logs. Why a lot of logs retentions are way more long (for example `journalctl` can store gigabytes of logs per default) than user commands retention (it's limited to 500 commands, considering that commands are generally short, the logs are maybe few kilobytes long)?
I suggest for Arch Linux to keep commands history at a minimum of 100 MB per default
(and here I only talk about troubleshooting, and not about the fact that sometimes you spend afternoons to understand the concept of a program to perform the perfect command and that you lose all your work in one week because you performed 500 commands after that and wiped it from history)
Offline
This is all up to your shell. Arch tends to accept the upstream defaults for things like this.
Online
Are you referring to .bash_history?
If so, you can tweak its maximum size via $HISTSIZE. See also: https://www.shellhacks.com/tune-command … tory-bash/
Inofficial first vice president of the Rust Evangelism Strike Force
Offline
This is all up to your shell. Arch tends to accept the upstream defaults for things like this.
I talk for the default shell that Arch takes in basic installation
So the problem should be addressed upstream? Or Arch community can decide to modify this parameter for Arch package?
Are you referring to .bash_history?
If so, you can tweak its maximum size via $HISTSIZE. See also: https://www.shellhacks.com/tune-command … tory-bash/
I talk about default behaviour here
Last edited by pn (2021-09-24 15:18:22)
Offline
I talk for the default shell that Arch takes in basic installation
There's no "default" with archlinux.
You choose the shell. You configure it as you like it. That's the default.
I suggest for Arch Linux to keep commands history at a minimum of 100 MB per default
So the problem should be addressed upstream? Or Arch community can decide to modify this parameter for Arch package?
What "problem"? You not finding $HISTSIZE? …
If you want to change the bash defaults, see https://savannah.gnu.org/support/?group=bash
But I guess that you'll have a hard time finding a second person on the planet who thinks that 100MB shell history, let alone for "troubleshooting" / TAE, that needs to be loaded w/ every interactive shell is anywhere *near* a sane idea.
sometimes you spend afternoons to understand the concept of a program to perform the perfect command and that you lose all your work in one week because you performed 500 commands after that and wiped it from history
Fwwi, for bash/zsh you can keep your TAE out of the history by prepending it w/ a blank: " awk 'i really do not understand how any of this works'"
Offline
There's also can be a distinction between long-term storage of your shell history and what is in active "history" or loaded in every interactive session and ready for use via history commands or the up arrow. It's perfectly reasonable and quite feasible to keep a long term record of shell commands stored on disk while still keeping a small loaded / active history. I'm certainly never going to hit the up arrow more than a couple times to retrieve an old command - so I'd really not need more than a few lines in the active history. Anytime I would want to 'grep' older history for a given command, it'd be just as easy (if not easier) to grep a log file rather than using a shell builtin history tool.
But all this is fairly tangential here - there are countless options on how you configure your shell, but it is up to you to do so.
Last edited by Trilby (2021-09-24 16:46:03)
"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman
Offline
Pages: 1