Linux command
hr 命令
文本
复制后可按需替换文件名、目录或参数。
常用示例
Print a horizontal rule using the default # character
hr
Print a horizontal rule with a specific character
hr [=]
Print multiple horizontal rules with different characters
hr [#] [-]
Print a horizontal rule with a multi-character pattern
hr [-#-]
说明
hr prints horizontal rules spanning the terminal width. Each argument is used as a character or pattern to repeat across one line. If no argument is given, # is used by default. Multiple arguments produce multiple lines, one per argument. The terminal width is determined by `tput cols`, falling back to the COLUMNS environment variable or 80 columns if neither is available.
FAQ
What is the hr command used for?
hr prints horizontal rules spanning the terminal width. Each argument is used as a character or pattern to repeat across one line. If no argument is given, # is used by default. Multiple arguments produce multiple lines, one per argument. The terminal width is determined by `tput cols`, falling back to the COLUMNS environment variable or 80 columns if neither is available.
How do I run a basic hr example?
Run `hr` in a terminal, then adjust file names, paths, flags, or remote targets for your system.
Where can I find more hr examples?
This page includes 4 examples for hr, plus related commands for nearby Linux tasks.