I came across these files in my home directory:
- .bash_history
- .bash_sessions (directory)
- .lesshst
and I cant help my OCD-ness and I want to remove them, is it safe?
These files should be minuscule in size, and are actually handy to have. Not to mention they will reappear, unless you reconfigure them not to do so.
.lesshst
Name of the history file used to remember search commands and shell commands between invocations of less. If set to "-", a history file is not used. The default is "$HOME/.lesshst" on Unix systems, "$HOME/_lesshst" on DOS and Windows systems, or "$HOME/lesshst.ini" or "$INIT/lesshst.ini" on OS/2 systems.
.bash_history
When the -o history option to the set builtin is enabled, the shell provides access to the command history, the list of commands previously typed.
.bash_sessions (directory)
From Reddit about El Capitan changes: A new folder (
~/.bash_sessions/
) is used to storeHISTFILE
's and.session
files that are unique to sessions. If$BASH_SESSION
or$TERM_SESSION_ID
is set upon launching the shell (i.e. if Terminal is resuming from a saved state), the associatedHISTFILE
is merged into the current one, and the.session
file is ran. Session saving is facilitated by means of anEXIT
trap being set for a functionbash_update_session_state
.
Your system will still work. However they will just come back, why do you want to remove them? They are harmless and shouldn't be taking up space on the disk.