Where is terminal output stored?
up vote
0
down vote
favorite
I open lxterminal, which shows up in ps
output as x-terminal-emulator. I then enter a command which prints it's output to STDOUT, which is visible on my screen. The command finishes, and I am shown another prompt.
The output of the previous command is still visible, so I can copy and paste it by GUI text selection, but I would like to be able to access it from a script.
Options for accessing this output that I can imagine:
- Is it stored somewhere, like in
/dev
? - Is it in memory somewhere that I could read with low-level tools?
- Can I script my terminal emulator to store the output of every command while still outputting it normally?
- Is there a tool to scrape text from GTK windows that could access the full terminal window contents?
terminal gtk terminal-emulator
add a comment |
up vote
0
down vote
favorite
I open lxterminal, which shows up in ps
output as x-terminal-emulator. I then enter a command which prints it's output to STDOUT, which is visible on my screen. The command finishes, and I am shown another prompt.
The output of the previous command is still visible, so I can copy and paste it by GUI text selection, but I would like to be able to access it from a script.
Options for accessing this output that I can imagine:
- Is it stored somewhere, like in
/dev
? - Is it in memory somewhere that I could read with low-level tools?
- Can I script my terminal emulator to store the output of every command while still outputting it normally?
- Is there a tool to scrape text from GTK windows that could access the full terminal window contents?
terminal gtk terminal-emulator
2
1. no 2. yes; and you can attach withgdb
to any processs and read its memory. 3. script(1), tee(1). 4. no
– mosvy
Sep 29 at 21:00
1
Related: unix.stackexchange.com/q/109509/117549 and unix.stackexchange.com/q/370393/117549
– Jeff Schaller
Sep 29 at 23:16
similar, but neither would be a duplicate
– Thomas Dickey
Sep 29 at 23:30
For your question #3: Thescript
command can be used to produce a log file of everything displayed on a terminal. Note that the stored data includes any terminal control characters emitted by the program that produced the output, so it may not be as easy to scrape as you might think.
– telcoM
Sep 30 at 5:22
Related: unix.stackexchange.com/q/483894
– sondra.kinsey
Nov 30 at 19:39
add a comment |
up vote
0
down vote
favorite
up vote
0
down vote
favorite
I open lxterminal, which shows up in ps
output as x-terminal-emulator. I then enter a command which prints it's output to STDOUT, which is visible on my screen. The command finishes, and I am shown another prompt.
The output of the previous command is still visible, so I can copy and paste it by GUI text selection, but I would like to be able to access it from a script.
Options for accessing this output that I can imagine:
- Is it stored somewhere, like in
/dev
? - Is it in memory somewhere that I could read with low-level tools?
- Can I script my terminal emulator to store the output of every command while still outputting it normally?
- Is there a tool to scrape text from GTK windows that could access the full terminal window contents?
terminal gtk terminal-emulator
I open lxterminal, which shows up in ps
output as x-terminal-emulator. I then enter a command which prints it's output to STDOUT, which is visible on my screen. The command finishes, and I am shown another prompt.
The output of the previous command is still visible, so I can copy and paste it by GUI text selection, but I would like to be able to access it from a script.
Options for accessing this output that I can imagine:
- Is it stored somewhere, like in
/dev
? - Is it in memory somewhere that I could read with low-level tools?
- Can I script my terminal emulator to store the output of every command while still outputting it normally?
- Is there a tool to scrape text from GTK windows that could access the full terminal window contents?
terminal gtk terminal-emulator
terminal gtk terminal-emulator
asked Sep 29 at 20:49
sondra.kinsey
1086
1086
2
1. no 2. yes; and you can attach withgdb
to any processs and read its memory. 3. script(1), tee(1). 4. no
– mosvy
Sep 29 at 21:00
1
Related: unix.stackexchange.com/q/109509/117549 and unix.stackexchange.com/q/370393/117549
– Jeff Schaller
Sep 29 at 23:16
similar, but neither would be a duplicate
– Thomas Dickey
Sep 29 at 23:30
For your question #3: Thescript
command can be used to produce a log file of everything displayed on a terminal. Note that the stored data includes any terminal control characters emitted by the program that produced the output, so it may not be as easy to scrape as you might think.
– telcoM
Sep 30 at 5:22
Related: unix.stackexchange.com/q/483894
– sondra.kinsey
Nov 30 at 19:39
add a comment |
2
1. no 2. yes; and you can attach withgdb
to any processs and read its memory. 3. script(1), tee(1). 4. no
– mosvy
Sep 29 at 21:00
1
Related: unix.stackexchange.com/q/109509/117549 and unix.stackexchange.com/q/370393/117549
– Jeff Schaller
Sep 29 at 23:16
similar, but neither would be a duplicate
– Thomas Dickey
Sep 29 at 23:30
For your question #3: Thescript
command can be used to produce a log file of everything displayed on a terminal. Note that the stored data includes any terminal control characters emitted by the program that produced the output, so it may not be as easy to scrape as you might think.
– telcoM
Sep 30 at 5:22
Related: unix.stackexchange.com/q/483894
– sondra.kinsey
Nov 30 at 19:39
2
2
1. no 2. yes; and you can attach with
gdb
to any processs and read its memory. 3. script(1), tee(1). 4. no– mosvy
Sep 29 at 21:00
1. no 2. yes; and you can attach with
gdb
to any processs and read its memory. 3. script(1), tee(1). 4. no– mosvy
Sep 29 at 21:00
1
1
Related: unix.stackexchange.com/q/109509/117549 and unix.stackexchange.com/q/370393/117549
– Jeff Schaller
Sep 29 at 23:16
Related: unix.stackexchange.com/q/109509/117549 and unix.stackexchange.com/q/370393/117549
– Jeff Schaller
Sep 29 at 23:16
similar, but neither would be a duplicate
– Thomas Dickey
Sep 29 at 23:30
similar, but neither would be a duplicate
– Thomas Dickey
Sep 29 at 23:30
For your question #3: The
script
command can be used to produce a log file of everything displayed on a terminal. Note that the stored data includes any terminal control characters emitted by the program that produced the output, so it may not be as easy to scrape as you might think.– telcoM
Sep 30 at 5:22
For your question #3: The
script
command can be used to produce a log file of everything displayed on a terminal. Note that the stored data includes any terminal control characters emitted by the program that produced the output, so it may not be as easy to scrape as you might think.– telcoM
Sep 30 at 5:22
Related: unix.stackexchange.com/q/483894
– sondra.kinsey
Nov 30 at 19:39
Related: unix.stackexchange.com/q/483894
– sondra.kinsey
Nov 30 at 19:39
add a comment |
1 Answer
1
active
oldest
votes
up vote
0
down vote
Regarding number (3), you could put "script -a <file>" in your .bashrc / .bash_profile / etc. which will save all commands in your terminal session.
New contributor
add a comment |
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
0
down vote
Regarding number (3), you could put "script -a <file>" in your .bashrc / .bash_profile / etc. which will save all commands in your terminal session.
New contributor
add a comment |
up vote
0
down vote
Regarding number (3), you could put "script -a <file>" in your .bashrc / .bash_profile / etc. which will save all commands in your terminal session.
New contributor
add a comment |
up vote
0
down vote
up vote
0
down vote
Regarding number (3), you could put "script -a <file>" in your .bashrc / .bash_profile / etc. which will save all commands in your terminal session.
New contributor
Regarding number (3), you could put "script -a <file>" in your .bashrc / .bash_profile / etc. which will save all commands in your terminal session.
New contributor
New contributor
answered Nov 30 at 20:05
Colin Pearse
1
1
New contributor
New contributor
add a comment |
add a comment |
Thanks for contributing an answer to Unix & Linux Stack Exchange!
- 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%2funix.stackexchange.com%2fquestions%2f472328%2fwhere-is-terminal-output-stored%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
2
1. no 2. yes; and you can attach with
gdb
to any processs and read its memory. 3. script(1), tee(1). 4. no– mosvy
Sep 29 at 21:00
1
Related: unix.stackexchange.com/q/109509/117549 and unix.stackexchange.com/q/370393/117549
– Jeff Schaller
Sep 29 at 23:16
similar, but neither would be a duplicate
– Thomas Dickey
Sep 29 at 23:30
For your question #3: The
script
command can be used to produce a log file of everything displayed on a terminal. Note that the stored data includes any terminal control characters emitted by the program that produced the output, so it may not be as easy to scrape as you might think.– telcoM
Sep 30 at 5:22
Related: unix.stackexchange.com/q/483894
– sondra.kinsey
Nov 30 at 19:39