gIrl1990
V2EX  ›  问与答

服务器登录上去,进 bash. 然后每执行一条命令,都会提示 cannot create. why?

  •  
  •   gIrl1990 · Sep 18, 2019 · 1612 views
    This topic created in 2439 days ago, the information mentioned may be changed or developed.

    打开set -x,看到它执行的是history -a

    bash: history: : cannot create: No such file or directory

    Supplement 1  ·  Sep 19, 2019

    应该是我把 HISTFILE 关了导致的。

    $ vi ~/.profile
    
    declare -x HISTFILE=""
    

    这样关有什么不对吗?

    1 replies    2019-09-29 11:27:16 +08:00
    gIrl1990
        1
    gIrl1990  
    OP
       Sep 29, 2019
    不管它了,写成 declare -x HISTFILE="/dev/null" 好了
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   844 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 136ms · UTC 21:34 · PVG 05:34 · LAX 14:34 · JFK 17:34
    ♥ Do have faith in what you're doing.