B
B
BorisT2014-12-30 13:30:35
linux
BorisT, 2014-12-30 13:30:35

Why is .bash_history and .bash_profile not written?

The history of user commands is saved only within the current session.
And if, for example, you add an alias, then it will also exist only up to within this session. If you write alias in .bash_profile, then alias is always available.
Why might these files not be written? Permissions and owners are correct, $HISTFILE contains correct path...
Debian 5 on NAS from WD

Answer the question

In order to leave comments, you need to log in

1 answer(s)
@
@ntkt, 2014-12-31
_

1) .bash_profile is not history, it never gets updated, the shell won't overwrite it. It is edited only by the user manually.
2) It is necessary to look at the place, all the configs in general. In general, by default, bash saves its history on exit. This behavior can be changed if you think the game is worth the candle (the "history -a" keywords to save and the "PROMPT_COMMAND" variable to do this after each command).

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question