commandbox.system.modules_app.system-commands.commands

Class tail

lucee.Component
    extended by commandbox.system.modules_app.system-commands.commands.tail

Tail the end of a file from the filesystem. Path may be absolute or relative to the current working directory. . {code:bash} tail file.txt {code} Displays the contents of a file to standard CommandBox output according to the number of lines argument. . Use the "lines" param to specify the number of lines to display, or it defaults to 15 lines. . {code:bash} tail file.txt 100 {code}

Class Attributes:
  • synchronized : false
  •  
  • accessors : false
  •  
  • persistent : false
  •  
    Property Summary
    type property default serializable required
    any ansiFormater


    • access = public
    • returntype = any
    • inject = AnsiFormater
    true false
    any printUtil


    • access = public
    • returntype = any
    • inject = print
    true false
    Method Summary
    any findStartPos()
    any run(any path, [numeric lines='15'], [boolean follow='false'])
     
    Methods inherited from class lucee.Component
    None

    Property Detail

    ansiFormater

    property any ansiFormater

    Attributes:
    access - public
    required - false
    returntype - any
    inject - AnsiFormater
    serializable - true

    printUtil

    property any printUtil

    Attributes:
    access - public
    required - false
    returntype - any
    inject - print
    serializable - true

    Method Detail

    findStartPos

    public any findStartPos()


    run

    public any run(any path, [numeric lines='15'], [boolean follow='false'])

    Parameters:
    path - file or directory to tail or raw input to process
    lines - number of lines to display.
    follow - Keep outputting new lines to the file until Ctrl-C is pressed