HI-100 | HISTFILE setting in perforce_bashrc is not cross-Linux portable. === Customer...-contributed comments === History is not kept for the perforce user on Ubuntu 20.04 with Helix Core/SDP Default bashrc is setup with history settings that follow: export HISTFILESIZE=5000 export HISTTIMEFORMAT="%Y/%m/%d %Z %H:%M:%S " export HISTFILE="~/.hist/history.$$.$RANDOM" When the shell attempts to write to the HISTFILE, the following error occurs: perforce@aws-p4d1:/home/perforce history -a -bash: history: ~/.hist/history.1029579.575: cannot create: No such file or directory Unfortunately, this error is silent when the history is not manually written and no history is written on shell exit. Updating the bashrc HISTFILE solves this issue: export HISTFILE="$HOME/.hist/history.$$.$RANDOM" Histories are now written and appear as expected. === Research === This has a good explanation - the quoting suppresses expansion of the ~: https://askubuntu.com/questions/1192981/why-isnt-tilde-recognised-as-home-folder-in-this-case Better to fix this removing the quotes, as the HOME variable isn't as reliably set as one would hope. « | |
Add Job |