How can I keep the terminal output always at the beginning?
I have large output from a python script that clear the terminal and print again, but the scrollbar of terminal always is in the bottom.
Is it possible to fix the scrollbar to the top so I could always see the beginning of the output like this:
I need the terminal to be continuously updating but it shouldn't scroll down to the end, I need to always see the top of the output even while it is updating.
Command example:
command-line scrollbar
New contributor
add a comment |
I have large output from a python script that clear the terminal and print again, but the scrollbar of terminal always is in the bottom.
Is it possible to fix the scrollbar to the top so I could always see the beginning of the output like this:
I need the terminal to be continuously updating but it shouldn't scroll down to the end, I need to always see the top of the output even while it is updating.
Command example:
command-line scrollbar
New contributor
3
Simply due to how terminal is implemented, it's always going to scroll down to the bottom and the last lines/characters. So always keeping first few lines on screen may be possible but it cuts against how terminals actually work and may be difficult to implement. Useless
ormore
or another pager software as terdon's answer suggests.
– Sergiy Kolodyazhnyy
Dec 18 at 0:40
add a comment |
I have large output from a python script that clear the terminal and print again, but the scrollbar of terminal always is in the bottom.
Is it possible to fix the scrollbar to the top so I could always see the beginning of the output like this:
I need the terminal to be continuously updating but it shouldn't scroll down to the end, I need to always see the top of the output even while it is updating.
Command example:
command-line scrollbar
New contributor
I have large output from a python script that clear the terminal and print again, but the scrollbar of terminal always is in the bottom.
Is it possible to fix the scrollbar to the top so I could always see the beginning of the output like this:
I need the terminal to be continuously updating but it shouldn't scroll down to the end, I need to always see the top of the output even while it is updating.
Command example:
command-line scrollbar
command-line scrollbar
New contributor
New contributor
edited Dec 18 at 1:00
New contributor
asked Dec 18 at 0:21
sebastian morales
162
162
New contributor
New contributor
3
Simply due to how terminal is implemented, it's always going to scroll down to the bottom and the last lines/characters. So always keeping first few lines on screen may be possible but it cuts against how terminals actually work and may be difficult to implement. Useless
ormore
or another pager software as terdon's answer suggests.
– Sergiy Kolodyazhnyy
Dec 18 at 0:40
add a comment |
3
Simply due to how terminal is implemented, it's always going to scroll down to the bottom and the last lines/characters. So always keeping first few lines on screen may be possible but it cuts against how terminals actually work and may be difficult to implement. Useless
ormore
or another pager software as terdon's answer suggests.
– Sergiy Kolodyazhnyy
Dec 18 at 0:40
3
3
Simply due to how terminal is implemented, it's always going to scroll down to the bottom and the last lines/characters. So always keeping first few lines on screen may be possible but it cuts against how terminals actually work and may be difficult to implement. Use
less
or more
or another pager software as terdon's answer suggests.– Sergiy Kolodyazhnyy
Dec 18 at 0:40
Simply due to how terminal is implemented, it's always going to scroll down to the bottom and the last lines/characters. So always keeping first few lines on screen may be possible but it cuts against how terminals actually work and may be difficult to implement. Use
less
or more
or another pager software as terdon's answer suggests.– Sergiy Kolodyazhnyy
Dec 18 at 0:40
add a comment |
2 Answers
2
active
oldest
votes
It sounds like you just want to use a pager like less
or more
:
$ seq 1 1000 | less
You can scroll up and down with the arrow keys and, when you've finished, hit q to exit. You can also search using /. See man less
for details.
Alternatively, you can use head
to only see the first few lines. For example
$ seq 1 1000 | head
1
2
3
4
5
6
7
8
9
10
Thanks for you answer, but the problem is that the script always is update the terminal so this process never end. I can't run "seq python script.py | head". What I want is for the terminal to continue updating is to be able to see always up and also thanks for the grammar corrections.
– sebastian morales
Dec 18 at 0:41
1
@sebastianmorales This information should be part of the question. Please click "edit" button under your question and add this. Otherwise question is incomplete and unclear.
– Sergiy Kolodyazhnyy
Dec 18 at 0:45
@SergiyKolodyazhnyy I do it. Ty
– sebastian morales
Dec 18 at 0:48
1
@sebastianmorales it would also help if you could give an example of a specific command you use that does this. I can't think of any tool that behaves as you describe but which doesn't already do this buffering for you. For example,top
will continuously update without scrolling down, but it is designed that way.
– terdon♦
Dec 18 at 0:53
@terdon I add a image in the body question with a small table, what I want to see is the header like block the scrollbar on the top.
– sebastian morales
Dec 18 at 1:03
|
show 2 more comments
There's an option in GNOME Terminal's Profile Preferences: Scroll on output. By default it's unchecked, and the effect is that, when a command is producing continuous output, and you scroll up at least once, then the terminal will not automatically scroll down to the latest line of output.
Unfortunately, you still do need to scroll up once when the output starts to trigger this behaviour. If that's not workable, using a pager like less
is the best option.
I had already activated this option, but it did not work. How can I use less with "python script.py"?
– sebastian morales
Dec 18 at 0:46
@sebastianmorales if you check that output, then the terminal will always jump to the last line. You should leave it unchecked and scroll when the output starts. As forless
, that's in terdon's answer.
– muru
Dec 18 at 0:48
add a comment |
Your Answer
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "89"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
sebastian morales is a new contributor. Be nice, and check out our Code of Conduct.
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
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1102688%2fhow-can-i-keep-the-terminal-output-always-at-the-beginning%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
It sounds like you just want to use a pager like less
or more
:
$ seq 1 1000 | less
You can scroll up and down with the arrow keys and, when you've finished, hit q to exit. You can also search using /. See man less
for details.
Alternatively, you can use head
to only see the first few lines. For example
$ seq 1 1000 | head
1
2
3
4
5
6
7
8
9
10
Thanks for you answer, but the problem is that the script always is update the terminal so this process never end. I can't run "seq python script.py | head". What I want is for the terminal to continue updating is to be able to see always up and also thanks for the grammar corrections.
– sebastian morales
Dec 18 at 0:41
1
@sebastianmorales This information should be part of the question. Please click "edit" button under your question and add this. Otherwise question is incomplete and unclear.
– Sergiy Kolodyazhnyy
Dec 18 at 0:45
@SergiyKolodyazhnyy I do it. Ty
– sebastian morales
Dec 18 at 0:48
1
@sebastianmorales it would also help if you could give an example of a specific command you use that does this. I can't think of any tool that behaves as you describe but which doesn't already do this buffering for you. For example,top
will continuously update without scrolling down, but it is designed that way.
– terdon♦
Dec 18 at 0:53
@terdon I add a image in the body question with a small table, what I want to see is the header like block the scrollbar on the top.
– sebastian morales
Dec 18 at 1:03
|
show 2 more comments
It sounds like you just want to use a pager like less
or more
:
$ seq 1 1000 | less
You can scroll up and down with the arrow keys and, when you've finished, hit q to exit. You can also search using /. See man less
for details.
Alternatively, you can use head
to only see the first few lines. For example
$ seq 1 1000 | head
1
2
3
4
5
6
7
8
9
10
Thanks for you answer, but the problem is that the script always is update the terminal so this process never end. I can't run "seq python script.py | head". What I want is for the terminal to continue updating is to be able to see always up and also thanks for the grammar corrections.
– sebastian morales
Dec 18 at 0:41
1
@sebastianmorales This information should be part of the question. Please click "edit" button under your question and add this. Otherwise question is incomplete and unclear.
– Sergiy Kolodyazhnyy
Dec 18 at 0:45
@SergiyKolodyazhnyy I do it. Ty
– sebastian morales
Dec 18 at 0:48
1
@sebastianmorales it would also help if you could give an example of a specific command you use that does this. I can't think of any tool that behaves as you describe but which doesn't already do this buffering for you. For example,top
will continuously update without scrolling down, but it is designed that way.
– terdon♦
Dec 18 at 0:53
@terdon I add a image in the body question with a small table, what I want to see is the header like block the scrollbar on the top.
– sebastian morales
Dec 18 at 1:03
|
show 2 more comments
It sounds like you just want to use a pager like less
or more
:
$ seq 1 1000 | less
You can scroll up and down with the arrow keys and, when you've finished, hit q to exit. You can also search using /. See man less
for details.
Alternatively, you can use head
to only see the first few lines. For example
$ seq 1 1000 | head
1
2
3
4
5
6
7
8
9
10
It sounds like you just want to use a pager like less
or more
:
$ seq 1 1000 | less
You can scroll up and down with the arrow keys and, when you've finished, hit q to exit. You can also search using /. See man less
for details.
Alternatively, you can use head
to only see the first few lines. For example
$ seq 1 1000 | head
1
2
3
4
5
6
7
8
9
10
answered Dec 18 at 0:30
terdon♦
64.1k12136212
64.1k12136212
Thanks for you answer, but the problem is that the script always is update the terminal so this process never end. I can't run "seq python script.py | head". What I want is for the terminal to continue updating is to be able to see always up and also thanks for the grammar corrections.
– sebastian morales
Dec 18 at 0:41
1
@sebastianmorales This information should be part of the question. Please click "edit" button under your question and add this. Otherwise question is incomplete and unclear.
– Sergiy Kolodyazhnyy
Dec 18 at 0:45
@SergiyKolodyazhnyy I do it. Ty
– sebastian morales
Dec 18 at 0:48
1
@sebastianmorales it would also help if you could give an example of a specific command you use that does this. I can't think of any tool that behaves as you describe but which doesn't already do this buffering for you. For example,top
will continuously update without scrolling down, but it is designed that way.
– terdon♦
Dec 18 at 0:53
@terdon I add a image in the body question with a small table, what I want to see is the header like block the scrollbar on the top.
– sebastian morales
Dec 18 at 1:03
|
show 2 more comments
Thanks for you answer, but the problem is that the script always is update the terminal so this process never end. I can't run "seq python script.py | head". What I want is for the terminal to continue updating is to be able to see always up and also thanks for the grammar corrections.
– sebastian morales
Dec 18 at 0:41
1
@sebastianmorales This information should be part of the question. Please click "edit" button under your question and add this. Otherwise question is incomplete and unclear.
– Sergiy Kolodyazhnyy
Dec 18 at 0:45
@SergiyKolodyazhnyy I do it. Ty
– sebastian morales
Dec 18 at 0:48
1
@sebastianmorales it would also help if you could give an example of a specific command you use that does this. I can't think of any tool that behaves as you describe but which doesn't already do this buffering for you. For example,top
will continuously update without scrolling down, but it is designed that way.
– terdon♦
Dec 18 at 0:53
@terdon I add a image in the body question with a small table, what I want to see is the header like block the scrollbar on the top.
– sebastian morales
Dec 18 at 1:03
Thanks for you answer, but the problem is that the script always is update the terminal so this process never end. I can't run "seq python script.py | head". What I want is for the terminal to continue updating is to be able to see always up and also thanks for the grammar corrections.
– sebastian morales
Dec 18 at 0:41
Thanks for you answer, but the problem is that the script always is update the terminal so this process never end. I can't run "seq python script.py | head". What I want is for the terminal to continue updating is to be able to see always up and also thanks for the grammar corrections.
– sebastian morales
Dec 18 at 0:41
1
1
@sebastianmorales This information should be part of the question. Please click "edit" button under your question and add this. Otherwise question is incomplete and unclear.
– Sergiy Kolodyazhnyy
Dec 18 at 0:45
@sebastianmorales This information should be part of the question. Please click "edit" button under your question and add this. Otherwise question is incomplete and unclear.
– Sergiy Kolodyazhnyy
Dec 18 at 0:45
@SergiyKolodyazhnyy I do it. Ty
– sebastian morales
Dec 18 at 0:48
@SergiyKolodyazhnyy I do it. Ty
– sebastian morales
Dec 18 at 0:48
1
1
@sebastianmorales it would also help if you could give an example of a specific command you use that does this. I can't think of any tool that behaves as you describe but which doesn't already do this buffering for you. For example,
top
will continuously update without scrolling down, but it is designed that way.– terdon♦
Dec 18 at 0:53
@sebastianmorales it would also help if you could give an example of a specific command you use that does this. I can't think of any tool that behaves as you describe but which doesn't already do this buffering for you. For example,
top
will continuously update without scrolling down, but it is designed that way.– terdon♦
Dec 18 at 0:53
@terdon I add a image in the body question with a small table, what I want to see is the header like block the scrollbar on the top.
– sebastian morales
Dec 18 at 1:03
@terdon I add a image in the body question with a small table, what I want to see is the header like block the scrollbar on the top.
– sebastian morales
Dec 18 at 1:03
|
show 2 more comments
There's an option in GNOME Terminal's Profile Preferences: Scroll on output. By default it's unchecked, and the effect is that, when a command is producing continuous output, and you scroll up at least once, then the terminal will not automatically scroll down to the latest line of output.
Unfortunately, you still do need to scroll up once when the output starts to trigger this behaviour. If that's not workable, using a pager like less
is the best option.
I had already activated this option, but it did not work. How can I use less with "python script.py"?
– sebastian morales
Dec 18 at 0:46
@sebastianmorales if you check that output, then the terminal will always jump to the last line. You should leave it unchecked and scroll when the output starts. As forless
, that's in terdon's answer.
– muru
Dec 18 at 0:48
add a comment |
There's an option in GNOME Terminal's Profile Preferences: Scroll on output. By default it's unchecked, and the effect is that, when a command is producing continuous output, and you scroll up at least once, then the terminal will not automatically scroll down to the latest line of output.
Unfortunately, you still do need to scroll up once when the output starts to trigger this behaviour. If that's not workable, using a pager like less
is the best option.
I had already activated this option, but it did not work. How can I use less with "python script.py"?
– sebastian morales
Dec 18 at 0:46
@sebastianmorales if you check that output, then the terminal will always jump to the last line. You should leave it unchecked and scroll when the output starts. As forless
, that's in terdon's answer.
– muru
Dec 18 at 0:48
add a comment |
There's an option in GNOME Terminal's Profile Preferences: Scroll on output. By default it's unchecked, and the effect is that, when a command is producing continuous output, and you scroll up at least once, then the terminal will not automatically scroll down to the latest line of output.
Unfortunately, you still do need to scroll up once when the output starts to trigger this behaviour. If that's not workable, using a pager like less
is the best option.
There's an option in GNOME Terminal's Profile Preferences: Scroll on output. By default it's unchecked, and the effect is that, when a command is producing continuous output, and you scroll up at least once, then the terminal will not automatically scroll down to the latest line of output.
Unfortunately, you still do need to scroll up once when the output starts to trigger this behaviour. If that's not workable, using a pager like less
is the best option.
answered Dec 18 at 0:43
muru
1
1
I had already activated this option, but it did not work. How can I use less with "python script.py"?
– sebastian morales
Dec 18 at 0:46
@sebastianmorales if you check that output, then the terminal will always jump to the last line. You should leave it unchecked and scroll when the output starts. As forless
, that's in terdon's answer.
– muru
Dec 18 at 0:48
add a comment |
I had already activated this option, but it did not work. How can I use less with "python script.py"?
– sebastian morales
Dec 18 at 0:46
@sebastianmorales if you check that output, then the terminal will always jump to the last line. You should leave it unchecked and scroll when the output starts. As forless
, that's in terdon's answer.
– muru
Dec 18 at 0:48
I had already activated this option, but it did not work. How can I use less with "python script.py"?
– sebastian morales
Dec 18 at 0:46
I had already activated this option, but it did not work. How can I use less with "python script.py"?
– sebastian morales
Dec 18 at 0:46
@sebastianmorales if you check that output, then the terminal will always jump to the last line. You should leave it unchecked and scroll when the output starts. As for
less
, that's in terdon's answer.– muru
Dec 18 at 0:48
@sebastianmorales if you check that output, then the terminal will always jump to the last line. You should leave it unchecked and scroll when the output starts. As for
less
, that's in terdon's answer.– muru
Dec 18 at 0:48
add a comment |
sebastian morales is a new contributor. Be nice, and check out our Code of Conduct.
sebastian morales is a new contributor. Be nice, and check out our Code of Conduct.
sebastian morales is a new contributor. Be nice, and check out our Code of Conduct.
sebastian morales is a new contributor. Be nice, and check out our Code of Conduct.
Thanks for contributing an answer to Ask Ubuntu!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Some of your past answers have not been well-received, and you're in danger of being blocked from answering.
Please pay close attention to the following guidance:
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
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
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1102688%2fhow-can-i-keep-the-terminal-output-always-at-the-beginning%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
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
Required, but never shown
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
Required, but never shown
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
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
3
Simply due to how terminal is implemented, it's always going to scroll down to the bottom and the last lines/characters. So always keeping first few lines on screen may be possible but it cuts against how terminals actually work and may be difficult to implement. Use
less
ormore
or another pager software as terdon's answer suggests.– Sergiy Kolodyazhnyy
Dec 18 at 0:40