4

I am working on a project that have reached over more than 3000 commands. However most of the commands of mine is repeated and generated automatically due to my program.

I have try to grep or export to file but it only displays 1000 commands recently.

Are there any ways that to have a look on those very first commands (for e.g first 500 commands).

Thanks in advance !

1 Answers1

4

My new settings I have recently found and used.

zeus@buster-raspi:~$ cat .bashrc
# ~/.bashrc: executed by bash(1) for non-login shells.
# see /usr/share/doc/bash/examples/startup-files (in the package bash-doc)
# for examples

snip ....

New history settings https://unix.stackexchange.com/questions/1288/preserve-bash-history-in-multiple-terminal-windows

export HISTCONTROL=ignoreboth:erasedups # no duplicate entries edited to ignore the blank line start too export HISTSIZE=100000 # big big history export HISTFILESIZE=100000 # big big history shopt -s histappend # append to history, don't overwrite it

Save and reload the history after each command finishes

export PROMPT_COMMAND="history -a; history -c; history -r; $PROMPT_COMMAND"