history
Display or manipulate the history list.[1]
Documentation
- bash -c 'help history'
Further information
- Effectively Use History Command in Linux (23.07.2024) [EN] @ It's FOSS
Syntax
history [-c] [-d OFFSET] [NUMBER]
history -anrw [FILE]
Parameters
- -a
- Append history lines from this session to the history file.
- -c
- Clear the history list by deleting all of the entries.
- -d OFFSET
- Delete the history entry at position OFFSET. Negative offsets count back from the end of the history list.
- -n
- Read all history lines not already read from the history file and append them to the history list.
- -r
- Read the history file and append the contents to the history list.
- -w
- Write the current history to the history file.
References
- ↑ bash -c 'help history'