V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
hailongs
V2EX  ›  MacBook Pro

mac 下搜索你们常用的命令是什么

  •  
  •   hailongs · 2016-01-04 18:21:14 +08:00 · 3080 次点击
    这是一个创建于 3037 天前的主题,其中的信息可能已经有所发展或是发生改变。

    1.搜索文件?
    2.搜索文件中的关键字?

    17 条回复    2016-01-06 23:41:13 +08:00
    SoloCompany
        1
    SoloCompany  
       2016-01-04 19:48:36 +08:00 via iPhone
    1 find | grep
    2 grep . -R
    foru17
        2
    foru17  
       2016-01-04 20:25:58 +08:00   ❤️ 1
    history | awk '{CMD[$2]++;count++;}END { for (a in CMD)print CMD[a] " " CMD[a]/count*100 "% " a;}' | grep -v "./" | column -c3 -s " " -t | sort -nr | nl | head -n10
    查看最常用的 10 个命令
    =====

    1 1643 24.7477% ls
    2 545 8.20907% cd
    3 507 7.63669% vim
    4 410 6.17563% j
    5 393 5.91957% gl
    6 329 4.95557% git
    7 281 4.23257% up
    8 260 3.91625% gs
    9 172 2.59075% service
    10 167 2.51544% sudo
    hackpro
        3
    hackpro  
       2016-01-04 23:33:17 +08:00
    ag named as silver searcher
    hailongs
        4
    hailongs  
    OP
       2016-01-04 23:54:16 +08:00
    @foru17 pt 是否可以搜文件?另外, pt 这个东西怎么下来着,我给忘了。。。。
    hailongs
        5
    hailongs  
    OP
       2016-01-04 23:54:49 +08:00
    @hackpro 啥意思
    shao
        6
    shao  
       2016-01-05 00:09:06 +08:00
    难道不是 Spotlight ?
    FrankFang128
        7
    FrankFang128  
       2016-01-05 00:11:36 +08:00
    fzf
    slixurd
        8
    slixurd  
       2016-01-05 00:41:38 +08:00
    locate/find
    Shintaku
        9
    Shintaku  
       2016-01-05 01:21:14 +08:00
    1. find -name FILE_NAME
    2. mdfind "KEY_WORD"
    hackpro
        10
    hackpro  
       2016-01-05 01:27:40 +08:00
    foru17
        11
    foru17  
       2016-01-05 02:13:52 +08:00
    @hailongs 我才发现我理解错 LZ 的标题了
    cxbig
        12
    cxbig  
       2016-01-05 04:00:03 +08:00
    1. find
    2. mdfind
    3. locate
    lyoe
        13
    lyoe  
       2016-01-05 11:34:08 +08:00
    1. find
    2. ag
    hailongs
        14
    hailongs  
    OP
       2016-01-05 14:46:36 +08:00
    @lyoe 你们用 find 每次都要输入密码,不烦吗???有没有 find 免输密码的方法???
    lyoe
        15
    lyoe  
       2016-01-05 16:44:02 +08:00
    @hailongs find 命令不需要密码啊,难道我们说的不是同一件事儿?
    hailongs
        16
    hailongs  
    OP
       2016-01-06 21:25:58 +08:00 via iPhone
    @lyoe 我用啊。艹。。说权限没有,每次都报拒绝
    kotokz
        17
    kotokz  
       2016-01-06 23:41:13 +08:00
    ag the_silver_searcher
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   2422 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 30ms · UTC 16:04 · PVG 00:04 · LAX 09:04 · JFK 12:04
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.