tail

    tail command for MoonX.

    command-line
    moonx
    wasm
    Download zip
    Author
    Version
    0.1.1
    License
    Apache-2.0
    Last updated
    15 days ago
    Downloads
    16

    Dependencies

    #tail for moonx

    Print the last lines or bytes of files or stdin:

    printf '1\n2\n3\n4\n' | moonx cli/tail -n 2 printf '1\n2\n3\n4\n' | moonx cli/tail -n +3 # from line 3 to the end moonx cli/tail -n 100 huge.log

    Options: -n N last N lines (default 10), -n +K from line K, -c N last N bytes, -c +K from byte K, -q/-v header control.

    Regular files are read GNU-style from the end in fixed-size chunks, so memory stays constant for any file size — a multi-gigabyte log tails instantly, on the wasm target included. Stdin and pipes are streamed with a ring buffer that holds only the selected suffix. There is no -f (follow) mode.

    With no file operand, an interactive terminal receives an EOF waiting prompt; piped, redirected, and explicit - input remain silent.

    Source Files