yxqcyl
V2EX  ›  问与答

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

  •  
  •   yxqcyl · Aug 11, 2013 · 2927 views
    This topic created in 4691 days ago, the information mentioned may be changed or developed.
    3 replies    1970-01-01 08:00:00 +08:00
    dorentus
        1
    dorentus  
       Aug 11, 2013
    http://unix.stackexchange.com/a/23919/32657

    compgen -c > list

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

    Google 『bash tab completion pipe to file』
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   1142 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 37ms · UTC 18:12 · PVG 02:12 · LAX 11:12 · JFK 14:12
    ♥ Do have faith in what you're doing.