imn1
V2EX  ›  Bash

find 命令如何每文件暂停?

  •  
  •   imn1 · Apr 27, 2017 · 2429 views
    This topic created in 3482 days ago, the information mentioned may be changed or developed.
    find ... -exec cat ...
    显示太快,要回滚才能看到前面的
    期望每找到一个文件,显示完暂停(等待按键,如空格)再继续下一个文件
    5 replies  •  2017-04-27 18:00:01 +08:00
    Lonely
    Lonely
    Apr 27, 2017 via iPhone❤️1
    1
    我记得 xargs 有这个功能
    blankme
    blankme
    Apr 27, 2017❤️1
    2
    觉得还是把结果 > 出来更方便一些
    mahone3297
    mahone3297
    Apr 27, 2017❤️1
    3
    less?
    RealLiuSha
    RealLiuSha
    Apr 27, 2017❤️1
    4
    for line in `find ./ -type f |xargs -n1`; do echo $line; read -rsp $'Press any key or wait 5 seconds to continue...\n' -n 1 -t 5; done;

    你看这样行不行
    likaci
    likaci
    Apr 27, 2017❤️1
    5
    | less
    | vim -
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Privacy   ·   Solana   ·   4107 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 30ms · UTC 06:44 · PVG 14:44 · LAX 22:44 · JFK 01:44
    ♥ Do have faith in what you're doing.