4 ms·
I also like to use sudo chattr +a .sh_history to ensure that my shell history file isn’t deleted. Being append-only, it also ensures that some type of timi
by mmsc 3y ago
I also like to use
sudo chattr +a .sh_history
to ensure that my shell history file isn’t deleted.
Being append-only, it also ensures that some type of timing issue in my shell which means my HISTFILESIZE or the equivalent isn’t set to something larger than default, meaning my history isn’t deleted.
- codetrotter 3y agoIf the shell is unaware that the file is append only, does it result in appending not just the commands run from this session but undesirably also ends up appending a full copy of a lot of the previous history?
- blueflow 3y agoI guess it means that the open() syscall will require the O_APPEND flag. If the file is opened without that flag it will error out.
- mgdlbp 3y agoa weaker method is to set a non-default HISTFILE after HISTSIZE etc