6

When I do a sudo systemctl status elasticsearch.service or a journalctl -xe on Debian 11 I have this output:

enter image description here

many lines are ended with > characters and I don't know how to handle these lines to see their remaining characters.

Or to disable this feature and see the commands doing a normal output, dumping the whole content of these lines, and not only the characters that can fit horizontally.

1
  • That looks like something drawn by whatever pager you're using here, rather that the systemctl itself. I've removed the console tag, as you're clearly on a window-system virtual terminal here, not a console. Commented Sep 1, 2022 at 14:14

2 Answers 2

11

You can see the full text using the Right Key (>) of your keyboard. If I'm not wrong when you use some commands like journalctl options..., systemctl options... these page their output through less command. This happens when the output lines are bigger than the width of your terminal.

If you want to avoid this behavior you can use:

systemctl status --no-pager elasticsearch.service
journalctl -xe --no-pager

Or if the command doesn't have some option like --no-pager you can try piping the output to cat command:

systemctl status elasticsearch.service | cat
5
  • 10
    You can also ask less to wrap long lines by pressing -S once it’s started, or adding S to the LESS environment variable. Commented Aug 31, 2022 at 17:29
  • @StephenKitt Great tip! I didn't know about that. I will use it better, it's more comfortable for me to see the full output instead of paging this one. Commented Aug 31, 2022 at 17:43
  • 2
    Piping through cat (or anything else) does have some side effects though, because systemctl no longer sees its output connected to a terminal, so colouring and other fancy formatting might get disabled and the output might be buffered (so that you won't see all of it immediately).
    – TooTea
    Commented Sep 1, 2022 at 8:35
  • 1
    @TooTea, it seems that systemctl understands the PAGER environment variable, so if you like its colouring, you could always PAGER=cat. Commented Sep 1, 2022 at 14:17
  • @TooTea Yes, I've noticed that, I don't know how it works. Because if you use neofetch | cat or neofetch > neo && cat neo you will see the colouring output. And if you see or edit the file neo you can see the color format like [[32m^[[1m. Maybe some commands like neofetch have the future for redirecting the color format too. Commented Sep 1, 2022 at 20:33
1

Press right arrow on a keyboard to scroll horizontally. You will be surprised by what you find.

1
  • I'd tried, but I'd hit :q before trying, always. That's why I never noticed that the right arrow key was doing something... In fact, I was even wondering why it did nothing! Commented Sep 1, 2022 at 9:11

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .