V2EX = way to explore
V2EX 是一个关于分享和探索的地方
Sign Up Now
For Existing Member  Sign In
gIrl1990
V2EX  ›  问与答

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

  •  
  •   gIrl1990 · Sep 18, 2019 · 1561 views
    This topic created in 2418 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   ·   2513 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 35ms · UTC 06:33 · PVG 14:33 · LAX 23:33 · JFK 02:33
    ♥ Do have faith in what you're doing.