journalctl: how to prevent text from truncating in terminal
Clash Royale CLAN TAG#URR8PPP
up vote
35
down vote
favorite
How can I keep long strings from truncating in terminal? For example if I run
journalctl -xn
There's a lot of text that I cannot read. I am open to using other programs/tools.
terminal systemd
add a comment |Â
up vote
35
down vote
favorite
How can I keep long strings from truncating in terminal? For example if I run
journalctl -xn
There's a lot of text that I cannot read. I am open to using other programs/tools.
terminal systemd
Usejournalctl -x
,-n
default to 10 lines in log only.
â cuonglm
Sep 12 '15 at 2:24
add a comment |Â
up vote
35
down vote
favorite
up vote
35
down vote
favorite
How can I keep long strings from truncating in terminal? For example if I run
journalctl -xn
There's a lot of text that I cannot read. I am open to using other programs/tools.
terminal systemd
How can I keep long strings from truncating in terminal? For example if I run
journalctl -xn
There's a lot of text that I cannot read. I am open to using other programs/tools.
terminal systemd
terminal systemd
edited Sep 12 '15 at 13:26
don_crissti
47.4k15126155
47.4k15126155
asked Sep 12 '15 at 2:18
P.Brian.Mackey
3912512
3912512
Usejournalctl -x
,-n
default to 10 lines in log only.
â cuonglm
Sep 12 '15 at 2:24
add a comment |Â
Usejournalctl -x
,-n
default to 10 lines in log only.
â cuonglm
Sep 12 '15 at 2:24
Use
journalctl -x
, -n
default to 10 lines in log only.â cuonglm
Sep 12 '15 at 2:24
Use
journalctl -x
, -n
default to 10 lines in log only.â cuonglm
Sep 12 '15 at 2:24
add a comment |Â
4 Answers
4
active
oldest
votes
up vote
30
down vote
accepted
From the journalctl
manpage:
The output is paged through less by default, and long lines are
"truncated" to screen width. The hidden part can be viewed by using the
left-arrow and right-arrow keys. Paging can be disabled; see the
--no-pager option and the "Environment" section below.
If you don't want to constantly be using the left and right arrow keys, simply pipe it directly to less
:
$ journalctl -xn | less
This will wrap lines that are too long for your terminal (the default behavior of less
, which journalctl
overrides).
Or, of course, if you don't mind possibly having to use your terminal's scrollback, you could use no pager at all:
$ journalctl -xn --no-pager
Ah, yes. I saw.
â cuonglm
Sep 12 '15 at 11:56
add a comment |Â
up vote
13
down vote
I also do:
journalctl -xn | less
But you can also set the SYSTEMD_LESS
environment variable:
SYSTEMD_LESS=FRXMK journalctl -xn
# Or even
# SYSTEMD_LESS="" journalctl -xn
# The environment variable needs to be there, but can be the empty string
I got that from: [systemd-devel] [PATCH] pager: wrap long lines by default
Set it in your .bashrc and be done with it! :-)
That systemd
needs to setup less
specially and doesn't just honor the less defaults and the LESS
environment seems a little arrogant to me, but hey, this works...
SYSTEMD_LESS support is only recently added, e.g CentOS 7 does not have a version that supports it
â jnas
Nov 19 '15 at 9:02
Works at least on CentOS 7.5.
â Vertigo
Aug 14 at 11:28
Great solution, I also addedDefaults env_keep += "LESS SYSTEMD_LESS"
to/etc/sudoers
. It's for those times when I accidentally putsudo
in front of e.g.systemctl status
.
â Metamorphic
Sep 14 at 17:51
add a comment |Â
up vote
2
down vote
If the program already uses less
(if not, pipe the output to it), you can enable/disable line wrapping by typing -S
(in less
), This works for other less
options as well.
add a comment |Â
up vote
-1
down vote
I type in terminal,journalctl | more
, works great for me then I use arrows up or down.
add a comment |Â
4 Answers
4
active
oldest
votes
4 Answers
4
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
30
down vote
accepted
From the journalctl
manpage:
The output is paged through less by default, and long lines are
"truncated" to screen width. The hidden part can be viewed by using the
left-arrow and right-arrow keys. Paging can be disabled; see the
--no-pager option and the "Environment" section below.
If you don't want to constantly be using the left and right arrow keys, simply pipe it directly to less
:
$ journalctl -xn | less
This will wrap lines that are too long for your terminal (the default behavior of less
, which journalctl
overrides).
Or, of course, if you don't mind possibly having to use your terminal's scrollback, you could use no pager at all:
$ journalctl -xn --no-pager
Ah, yes. I saw.
â cuonglm
Sep 12 '15 at 11:56
add a comment |Â
up vote
30
down vote
accepted
From the journalctl
manpage:
The output is paged through less by default, and long lines are
"truncated" to screen width. The hidden part can be viewed by using the
left-arrow and right-arrow keys. Paging can be disabled; see the
--no-pager option and the "Environment" section below.
If you don't want to constantly be using the left and right arrow keys, simply pipe it directly to less
:
$ journalctl -xn | less
This will wrap lines that are too long for your terminal (the default behavior of less
, which journalctl
overrides).
Or, of course, if you don't mind possibly having to use your terminal's scrollback, you could use no pager at all:
$ journalctl -xn --no-pager
Ah, yes. I saw.
â cuonglm
Sep 12 '15 at 11:56
add a comment |Â
up vote
30
down vote
accepted
up vote
30
down vote
accepted
From the journalctl
manpage:
The output is paged through less by default, and long lines are
"truncated" to screen width. The hidden part can be viewed by using the
left-arrow and right-arrow keys. Paging can be disabled; see the
--no-pager option and the "Environment" section below.
If you don't want to constantly be using the left and right arrow keys, simply pipe it directly to less
:
$ journalctl -xn | less
This will wrap lines that are too long for your terminal (the default behavior of less
, which journalctl
overrides).
Or, of course, if you don't mind possibly having to use your terminal's scrollback, you could use no pager at all:
$ journalctl -xn --no-pager
From the journalctl
manpage:
The output is paged through less by default, and long lines are
"truncated" to screen width. The hidden part can be viewed by using the
left-arrow and right-arrow keys. Paging can be disabled; see the
--no-pager option and the "Environment" section below.
If you don't want to constantly be using the left and right arrow keys, simply pipe it directly to less
:
$ journalctl -xn | less
This will wrap lines that are too long for your terminal (the default behavior of less
, which journalctl
overrides).
Or, of course, if you don't mind possibly having to use your terminal's scrollback, you could use no pager at all:
$ journalctl -xn --no-pager
edited Sep 12 '15 at 3:34
answered Sep 12 '15 at 3:28
Doorknob
1,396816
1,396816
Ah, yes. I saw.
â cuonglm
Sep 12 '15 at 11:56
add a comment |Â
Ah, yes. I saw.
â cuonglm
Sep 12 '15 at 11:56
Ah, yes. I saw.
â cuonglm
Sep 12 '15 at 11:56
Ah, yes. I saw.
â cuonglm
Sep 12 '15 at 11:56
add a comment |Â
up vote
13
down vote
I also do:
journalctl -xn | less
But you can also set the SYSTEMD_LESS
environment variable:
SYSTEMD_LESS=FRXMK journalctl -xn
# Or even
# SYSTEMD_LESS="" journalctl -xn
# The environment variable needs to be there, but can be the empty string
I got that from: [systemd-devel] [PATCH] pager: wrap long lines by default
Set it in your .bashrc and be done with it! :-)
That systemd
needs to setup less
specially and doesn't just honor the less defaults and the LESS
environment seems a little arrogant to me, but hey, this works...
SYSTEMD_LESS support is only recently added, e.g CentOS 7 does not have a version that supports it
â jnas
Nov 19 '15 at 9:02
Works at least on CentOS 7.5.
â Vertigo
Aug 14 at 11:28
Great solution, I also addedDefaults env_keep += "LESS SYSTEMD_LESS"
to/etc/sudoers
. It's for those times when I accidentally putsudo
in front of e.g.systemctl status
.
â Metamorphic
Sep 14 at 17:51
add a comment |Â
up vote
13
down vote
I also do:
journalctl -xn | less
But you can also set the SYSTEMD_LESS
environment variable:
SYSTEMD_LESS=FRXMK journalctl -xn
# Or even
# SYSTEMD_LESS="" journalctl -xn
# The environment variable needs to be there, but can be the empty string
I got that from: [systemd-devel] [PATCH] pager: wrap long lines by default
Set it in your .bashrc and be done with it! :-)
That systemd
needs to setup less
specially and doesn't just honor the less defaults and the LESS
environment seems a little arrogant to me, but hey, this works...
SYSTEMD_LESS support is only recently added, e.g CentOS 7 does not have a version that supports it
â jnas
Nov 19 '15 at 9:02
Works at least on CentOS 7.5.
â Vertigo
Aug 14 at 11:28
Great solution, I also addedDefaults env_keep += "LESS SYSTEMD_LESS"
to/etc/sudoers
. It's for those times when I accidentally putsudo
in front of e.g.systemctl status
.
â Metamorphic
Sep 14 at 17:51
add a comment |Â
up vote
13
down vote
up vote
13
down vote
I also do:
journalctl -xn | less
But you can also set the SYSTEMD_LESS
environment variable:
SYSTEMD_LESS=FRXMK journalctl -xn
# Or even
# SYSTEMD_LESS="" journalctl -xn
# The environment variable needs to be there, but can be the empty string
I got that from: [systemd-devel] [PATCH] pager: wrap long lines by default
Set it in your .bashrc and be done with it! :-)
That systemd
needs to setup less
specially and doesn't just honor the less defaults and the LESS
environment seems a little arrogant to me, but hey, this works...
I also do:
journalctl -xn | less
But you can also set the SYSTEMD_LESS
environment variable:
SYSTEMD_LESS=FRXMK journalctl -xn
# Or even
# SYSTEMD_LESS="" journalctl -xn
# The environment variable needs to be there, but can be the empty string
I got that from: [systemd-devel] [PATCH] pager: wrap long lines by default
Set it in your .bashrc and be done with it! :-)
That systemd
needs to setup less
specially and doesn't just honor the less defaults and the LESS
environment seems a little arrogant to me, but hey, this works...
answered Nov 9 '15 at 9:17
Peter V. Mørch
26515
26515
SYSTEMD_LESS support is only recently added, e.g CentOS 7 does not have a version that supports it
â jnas
Nov 19 '15 at 9:02
Works at least on CentOS 7.5.
â Vertigo
Aug 14 at 11:28
Great solution, I also addedDefaults env_keep += "LESS SYSTEMD_LESS"
to/etc/sudoers
. It's for those times when I accidentally putsudo
in front of e.g.systemctl status
.
â Metamorphic
Sep 14 at 17:51
add a comment |Â
SYSTEMD_LESS support is only recently added, e.g CentOS 7 does not have a version that supports it
â jnas
Nov 19 '15 at 9:02
Works at least on CentOS 7.5.
â Vertigo
Aug 14 at 11:28
Great solution, I also addedDefaults env_keep += "LESS SYSTEMD_LESS"
to/etc/sudoers
. It's for those times when I accidentally putsudo
in front of e.g.systemctl status
.
â Metamorphic
Sep 14 at 17:51
SYSTEMD_LESS support is only recently added, e.g CentOS 7 does not have a version that supports it
â jnas
Nov 19 '15 at 9:02
SYSTEMD_LESS support is only recently added, e.g CentOS 7 does not have a version that supports it
â jnas
Nov 19 '15 at 9:02
Works at least on CentOS 7.5.
â Vertigo
Aug 14 at 11:28
Works at least on CentOS 7.5.
â Vertigo
Aug 14 at 11:28
Great solution, I also added
Defaults env_keep += "LESS SYSTEMD_LESS"
to /etc/sudoers
. It's for those times when I accidentally put sudo
in front of e.g. systemctl status
.â Metamorphic
Sep 14 at 17:51
Great solution, I also added
Defaults env_keep += "LESS SYSTEMD_LESS"
to /etc/sudoers
. It's for those times when I accidentally put sudo
in front of e.g. systemctl status
.â Metamorphic
Sep 14 at 17:51
add a comment |Â
up vote
2
down vote
If the program already uses less
(if not, pipe the output to it), you can enable/disable line wrapping by typing -S
(in less
), This works for other less
options as well.
add a comment |Â
up vote
2
down vote
If the program already uses less
(if not, pipe the output to it), you can enable/disable line wrapping by typing -S
(in less
), This works for other less
options as well.
add a comment |Â
up vote
2
down vote
up vote
2
down vote
If the program already uses less
(if not, pipe the output to it), you can enable/disable line wrapping by typing -S
(in less
), This works for other less
options as well.
If the program already uses less
(if not, pipe the output to it), you can enable/disable line wrapping by typing -S
(in less
), This works for other less
options as well.
answered Sep 12 '15 at 8:22
Thomas Erker
1,689715
1,689715
add a comment |Â
add a comment |Â
up vote
-1
down vote
I type in terminal,journalctl | more
, works great for me then I use arrows up or down.
add a comment |Â
up vote
-1
down vote
I type in terminal,journalctl | more
, works great for me then I use arrows up or down.
add a comment |Â
up vote
-1
down vote
up vote
-1
down vote
I type in terminal,journalctl | more
, works great for me then I use arrows up or down.
I type in terminal,journalctl | more
, works great for me then I use arrows up or down.
edited Sep 8 at 5:25
Tejas
1,77621837
1,77621837
answered Sep 8 at 2:01
user309707
1
1
add a comment |Â
add a comment |Â
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f229188%2fjournalctl-how-to-prevent-text-from-truncating-in-terminal%23new-answer', 'question_page');
);
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Use
journalctl -x
,-n
default to 10 lines in log only.â cuonglm
Sep 12 '15 at 2:24