History(历史)命令用法 - 使用 HISTFILE 更改历史文件名称

默认情况下,命令历史存储在 ~/.bashhistory 文件中。添加下列内容到 .bashprofile 文件并重新登录 bash shell,将使用 .commandline_warrior 来存储命令历史:# vi ~/.bash_profile HISTFILE=/root/.commandline_warrior