V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
V2EX 提问指南
yxqcyl
V2EX  ›  问与答

linux 终端中按两下tab会出现所有可用命令,我想把他的输出重定向到一个文件中,该怎么做呢?

  •  
  •   yxqcyl · 2013-08-11 11:38:42 +08:00 · 2445 次点击
    这是一个创建于 3920 天前的主题,其中的信息可能已经有所发展或是发生改变。
    3 条回复    1970-01-01 08:00:00 +08:00
    dorentus
        1
    dorentus  
       2013-08-11 12:10:22 +08:00
    http://unix.stackexchange.com/a/23919/32657

    compgen -c > list

    compgen 应该是 bash 的内置命令,如果你用别的 shell 的话,估计它们也会提供类似的功能的把。
    yxqcyl
        2
    yxqcyl  
    OP
       2013-08-11 12:25:19 +08:00
    @dorentus 谢谢,大神
    dorentus
        3
    dorentus  
       2013-08-11 13:06:17 +08:00
    其实我也是现搜到的……

    Google 『bash tab completion pipe to file』
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   2636 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 37ms · UTC 15:15 · PVG 23:15 · LAX 08:15 · JFK 11:15
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.