LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   (Solved) Where is the output file for the terminal? (https://www.linuxquestions.org/questions/linux-newbie-8/solved-where-is-the-output-file-for-the-terminal-4175504203/)

wmichaelb 05-07-2014 08:50 AM

(Solved) Where is the output file for the terminal?
 
I've been cutting and pasting the terminal output after a Debian update into a text file that I closed during a senior moment. I can find each individual line in the terminal by hitting the up arrow key, so I assume that that content is stored in a file somewhere. Can someone please tell me where? Thanks in advance.

pan64 05-07-2014 09:00 AM

If I understand it correctly it is stored in memory, not in file. Probably you can paste it again into another text file.

rtmistler 05-07-2014 09:03 AM

There isn't a file. If you're using a window manager and have a command prompt open there which has scrollbar and history, you can grab all that the window history contains and paste that into a text document. Whichever editor you were using may have kept a backup of your last interim edits. Check for files containing # or ~ characters in them in the same starting location where you began your edits from, they may be hidden files which start with a period character at the start of the file name, but they'll have most if not all of the edit file name's name. Then copy that backup file to another file so that you retain it and see if that has most of your most recent edits. I think it all depends if it made a sync backup and when it last did that, to determine how much you can recover or how much you stand to lose.

What exact editor were you using? Those familiar can let you know what they know about that editor's backup practices, or not.

There's actually been a few recent posts about keeping record logs for command line progress:

http://www.linuxquestions.org/questi...ux-4175504061/
http://www.linuxquestions.org/questi...on-4175502162/

JeremyBoden 05-07-2014 09:04 AM

If you can see it in the terminal, it's worth trying
Code:

history > file-of-forgotten-bits
That's just a guess, though.

wmichaelb 05-07-2014 10:24 AM

Thanks!
1.) I learned the history command. For some reason, the command did not return all the content I was looking for, but onl
the last few lines. But it's great to know.
2.) I found the text file I was looking for by clicking on "reopen". I thought that I'd checked that, but apparently not.
The data is now safely saved on a thumb drive for debugging.

grail 05-07-2014 12:41 PM

Please use the Thread Tools to mark the question as SOLVED


All times are GMT -5. The time now is 04:07 PM.