Linux command
multitail 命令
文件
复制后可按需替换文件名、目录或参数。
常用示例
Follow multiple files
multitail [file1.log] [file2.log]
Split screen horizontally
multitail -s 2 [file1.log] [file2.log]
Merge files in one window
multitail -I [file1.log] -I [file2.log]
Follow with color scheme
multitail -cS [apache] [access.log]
Execute and follow command
multitail -l "[command]"
Follow with timestamp
multitail -ts [file.log]
说明
multitail allows viewing multiple log files in a single terminal window. It splits the screen to show different files or merges them with color coding. The tool provides filtering, searching, and highlighting capabilities for effective log monitoring.
参数
- -s _n_
- Split in n columns.
- -I _file_
- Merge file into previous.
- -l _cmd_
- Execute command and follow.
- -L _cmd_
- Same as -l but restart on exit.
- -cS _scheme_
- Color scheme.
- -ts
- Add timestamp.
- -f
- Follow mode.
- -i _file_
- Add file in new window.
- -n _lines_
- Number of lines per window.
- -m _lines_
- Scrollback buffer size.
FAQ
What is the multitail command used for?
multitail allows viewing multiple log files in a single terminal window. It splits the screen to show different files or merges them with color coding. The tool provides filtering, searching, and highlighting capabilities for effective log monitoring.
How do I run a basic multitail example?
Run `multitail [file1.log] [file2.log]` in a terminal, then adjust file names, paths, flags, or remote targets for your system.
What does -s _n_ do in multitail?
Split in n columns.