Announcement

Collapse
No announcement yet.

Konsole - Terminal - saved out of commands

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    [KDE] Konsole - Terminal - saved out of commands

    Not to sure if this KDE or LINUX overall.
    Q. Is there a file that stroes the OUTPUTS of commands executed within Terminal or Konsole?

    Q. Is there a way (besides Grep output.txt) for all commands and their respective outputs to be automatically saved.

    YES. I am aware of .bash_history in the /Home folder.
    People have asked this, and from what I've read you cannot (in 2008 or 2016) read the command output of terminal/Konsole after it's closed. WHAT I have read is that you can turn this feature on.
    As mentioned above. Not to sure if it's KDE or Linux, or Gnome...
    TIA

    #2
    You can "tee" your bash console to a file, thus saving all text from it. You can try using the "screen" command to do the same. You can try zsh instead of bash - it has more options and might include one to capture output.

    Please Read Me

    Comment


      #3
      tmux ... perhaps with a plugin such as tmux logging
      Regards, John Little

      Comment


        #4
        Originally posted by jlittle View Post
        tmux ... perhaps with a plugin such as tmux logging
        Okay. Sounds good. Found the install software, now how do I make it "automatic"?? Please??

        Comment


          #5
          Originally posted by CharlieDaves View Post
          tmux ... Found the install software, now how do I make it "automatic"?? Please??
          Sorry, it's a while since I used it. All I can suggest is man tmux (daunting, it's 3300 lines long), or one of the stack exchange forums, and work out the commands to log output the way you want, then put them in ~/.tmux.conf.
          Regards, John Little

          Comment


            #6
            Originally posted by CharlieDaves View Post
            YES. I am aware of .bash_history in the /Home folder.
            People have asked this, and from what I've read you cannot (in 2008 or 2016) read the command output of terminal/Konsole after it's closed.
            .bash_history is just a text file. It can be opened by any text editor.
            Windows no longer obstructs my view.
            Using Kubuntu Linux since March 23, 2007.
            "It is a capital mistake to theorize before one has data." - Sherlock Holmes

            Comment


              #7
              Just looked at my .bash_history. It shows each INPUT command, and with almost every case there is no RESULTANT OUTPUT. So if I entered df -h in konsole, the df -h shows up in .bash_history but not the data that shows on the konsole screen from df -h.
              The next brick house on the left
              Intel i7 11th Gen | 16GB | 1TB | KDE Plasma 5.27.11​| Kubuntu 24.04 | 6.8.0-31-generic



              Comment


                #8
                Another solution I was thinking of.... I've set <Menu>+R to run Konsole. I could add a script file to add output to %DATE%TIME of all within Konsole.
                Now my programming stills are a tad rusty.
                Would someone please be kind enough to rough something together. I am more suited to problem solving than actual create a program. It's just the way my brain works.
                thanks

                Comment


                  #9
                  Originally posted by jglen490 View Post
                  Just looked at my .bash_history. It shows each INPUT command, and with almost every case there is no RESULTANT OUTPUT. So if I entered df -h in konsole, the df -h shows up in .bash_history but not the data that shows on the konsole screen from df -h.
                  Yeah! I knew this already. it's great at finding what commands you have used in the past. Just not what the output was or even WHEN the command was used.
                  It's a start. Thanks anyhow

                  Comment


                    #10
                    The script command should be sufficient for Bash, see:
                    https://unix.stackexchange.com/quest...tput-to-a-file
                    Debian KDE & LXQt • Kubuntu & Lubuntu • openSUSE KDE • Windows • macOS X
                    Desktop: Lenovo ThinkCentre M75s • Laptop: Apple MacBook Pro 13" • and others

                    get rid of Snap script (20.04 +)reinstall Snap for release-upgrade script (20.04 +)
                    install traditional Firefox script (22.04 +)​ • install traditional Thunderbird script (24.04)

                    Comment

                    Working...
                    X