Difference between revisions of "History -a"
Jump to navigation
Jump to search
(One intermediate revision by the same user not shown) | |||
Line 5: | Line 5: | ||
history -a; ls -al [[~/.bash_history]] | history -a; ls -al [[~/.bash_history]] | ||
+ | |||
+ | Save every executed command to: <code>[[~/.bash_history]]</code> | ||
+ | [[export]] [[PROMPT_COMMAND]]='[[history]] -a' | ||
+ | |||
+ | == Related == | ||
[[history -c]] | [[history -c]] | ||
[[history -r]] | [[history -r]] |
Latest revision as of 14:30, 25 January 2024
-a append history lines from this session to the history file
history -a; ls -al ~/.bash_history
Save every executed command to: ~/.bash_history
export PROMPT_COMMAND='history -a'
Related[edit]
history -c history -r
See also[edit]
- Bash history:
history[ -a | -c | -r ]
,history --help
,~/.bash_history
,HISTFILE, HISTSIZE, HISTTIMEFORMAT, HSTR
Advertising: