V2EX = way to explore
V2EX 是一个关于分享和探索的地方
Sign Up Now
For Existing Member  Sign In
Distributions
Ubuntu
Fedora
CentOS
中文资源站
网易开源镜像站
rinabell
V2EX  ›  Linux

‘locate settings.json|xargs vim’ 这个命令为什么会导致命令行卡死啊?

  •  
  •   rinabell · Oct 29, 2019 · 3215 views
    This topic created in 2372 days ago, the information mentioned may be changed or developed.
    以及 tmux 怎么删除一个卡死的窗口(注意是窗口 window 而不是会话 session,会话注销是 C+b +d 这个我知道)。
    查了一会子了还是找不到答案,有没有大佬给讲讲
    7 replies    2019-10-30 20:06:22 +08:00
    rinabell
        1
    rinabell  
    OP
       Oct 29, 2019
    对了 'locate settings.json' 我确定只有一行输出,然后我 :wq 退出 vim,之后命令行就卡在那里不能输入了
    rinabell
        2
    rinabell  
    OP
       Oct 29, 2019
    查到了,tmux 关闭窗格的快捷键是 x。但是还是不知道为啥会卡死
    zhuisui
        3
    zhuisui  
       Oct 29, 2019
    你看看有多少文件,可能文件太多导致卡死了
    rinabell
        4
    rinabell  
    OP
       Oct 29, 2019 via Android
    @zhuisui 只有一个文件名啊
    jdhao
        5
    jdhao  
       Oct 29, 2019 via Android
    mark,等会我复现一下
    jdhao
        6
    jdhao  
       Oct 29, 2019
    我运行的时候 vim 提示了一个 warning:input is not from a terminal, 但是可以打开文件,不会卡死,具体解释参考 https://superuser.com/questions/336016/invoking-vi-through-find-xargs-breaks-my-terminal-why
    zhuisui
        7
    zhuisui  
       Oct 30, 2019
    你先看看单独 locate 部分什么表现吧。
    如果你确定 locate settings.json 结果只有一个文件名,那可能你得 profile 了。记得有个工具可以列出执行一个命令各个调用花费的时间
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   5063 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 33ms · UTC 05:38 · PVG 13:38 · LAX 22:38 · JFK 01:38
    ♥ Do have faith in what you're doing.