Export content of screen daemon to file












5















I'd like to export the content of a detached screen under linux.
I tried those command:



screen -x 2>&1 > temp
screen -x > temp 2>&1
screen -x > temp


But it's not working, It keeps reattaching to a session instead of exporting it in the "temp" file.



Screen version: 4.00.03jw4



What do I do wrong?










share|improve this question





























    5















    I'd like to export the content of a detached screen under linux.
    I tried those command:



    screen -x 2>&1 > temp
    screen -x > temp 2>&1
    screen -x > temp


    But it's not working, It keeps reattaching to a session instead of exporting it in the "temp" file.



    Screen version: 4.00.03jw4



    What do I do wrong?










    share|improve this question



























      5












      5








      5


      1






      I'd like to export the content of a detached screen under linux.
      I tried those command:



      screen -x 2>&1 > temp
      screen -x > temp 2>&1
      screen -x > temp


      But it's not working, It keeps reattaching to a session instead of exporting it in the "temp" file.



      Screen version: 4.00.03jw4



      What do I do wrong?










      share|improve this question
















      I'd like to export the content of a detached screen under linux.
      I tried those command:



      screen -x 2>&1 > temp
      screen -x > temp 2>&1
      screen -x > temp


      But it's not working, It keeps reattaching to a session instead of exporting it in the "temp" file.



      Screen version: 4.00.03jw4



      What do I do wrong?







      linux arch-linux gnu-screen






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Dec 13 '13 at 10:50









      Anthon

      60.5k17102165




      60.5k17102165










      asked Dec 13 '13 at 9:04









      ThaldathThaldath

      304211




      304211






















          2 Answers
          2






          active

          oldest

          votes


















          6














          You probably want to do something like:



          screen -p 0 -X hardcopy


          this generates a file hardcopy.0 with the content of the screen session.
          The argument to -p determines which session.



          The files are dumped in screens current working directory or to the directory set set with the hardcopydir command. Check the screen configuration file for hardcopydir (/etc/screenrc).






          share|improve this answer





















          • 1





            Hi, thanks for your answer! I can't find the hardcopy file.

            – Thaldath
            Dec 13 '13 at 10:21











          • it should be in the directory that you run the command in. Please check your write permissions there and post the version of screen you use (output of screen -v preferably in the question)

            – Anthon
            Dec 13 '13 at 10:27











          • Screen version: 4.00.03jw4 I've got full r/w permission.

            – Thaldath
            Dec 13 '13 at 10:37











          • That is the same version I have, did you cut and paste the command? Run it in a different terminal than the running screen session. Any message from running the command?

            – Anthon
            Dec 13 '13 at 10:51











          • yep, I used the same command. But there is a program running in the screen, I don't know if this change anything or not?

            – Thaldath
            Dec 13 '13 at 13:31



















          0














          If you're finding that the above doesn't seem to work, or it works and yet you can't seem to find the danged file, you can do this from inside the session itself:



          CTRL+A



          CTRL+SHIFT+:



          hardcopy -h /some/path/you/can/reach



          That should work and lets you put it wherever you want.






          share|improve this answer























            Your Answer








            StackExchange.ready(function() {
            var channelOptions = {
            tags: "".split(" "),
            id: "106"
            };
            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: false,
            noModals: true,
            showLowRepImageUploadWarning: true,
            reputationToPostImages: null,
            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
            });


            }
            });














            draft saved

            draft discarded


















            StackExchange.ready(
            function () {
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f104984%2fexport-content-of-screen-daemon-to-file%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









            6














            You probably want to do something like:



            screen -p 0 -X hardcopy


            this generates a file hardcopy.0 with the content of the screen session.
            The argument to -p determines which session.



            The files are dumped in screens current working directory or to the directory set set with the hardcopydir command. Check the screen configuration file for hardcopydir (/etc/screenrc).






            share|improve this answer





















            • 1





              Hi, thanks for your answer! I can't find the hardcopy file.

              – Thaldath
              Dec 13 '13 at 10:21











            • it should be in the directory that you run the command in. Please check your write permissions there and post the version of screen you use (output of screen -v preferably in the question)

              – Anthon
              Dec 13 '13 at 10:27











            • Screen version: 4.00.03jw4 I've got full r/w permission.

              – Thaldath
              Dec 13 '13 at 10:37











            • That is the same version I have, did you cut and paste the command? Run it in a different terminal than the running screen session. Any message from running the command?

              – Anthon
              Dec 13 '13 at 10:51











            • yep, I used the same command. But there is a program running in the screen, I don't know if this change anything or not?

              – Thaldath
              Dec 13 '13 at 13:31
















            6














            You probably want to do something like:



            screen -p 0 -X hardcopy


            this generates a file hardcopy.0 with the content of the screen session.
            The argument to -p determines which session.



            The files are dumped in screens current working directory or to the directory set set with the hardcopydir command. Check the screen configuration file for hardcopydir (/etc/screenrc).






            share|improve this answer





















            • 1





              Hi, thanks for your answer! I can't find the hardcopy file.

              – Thaldath
              Dec 13 '13 at 10:21











            • it should be in the directory that you run the command in. Please check your write permissions there and post the version of screen you use (output of screen -v preferably in the question)

              – Anthon
              Dec 13 '13 at 10:27











            • Screen version: 4.00.03jw4 I've got full r/w permission.

              – Thaldath
              Dec 13 '13 at 10:37











            • That is the same version I have, did you cut and paste the command? Run it in a different terminal than the running screen session. Any message from running the command?

              – Anthon
              Dec 13 '13 at 10:51











            • yep, I used the same command. But there is a program running in the screen, I don't know if this change anything or not?

              – Thaldath
              Dec 13 '13 at 13:31














            6












            6








            6







            You probably want to do something like:



            screen -p 0 -X hardcopy


            this generates a file hardcopy.0 with the content of the screen session.
            The argument to -p determines which session.



            The files are dumped in screens current working directory or to the directory set set with the hardcopydir command. Check the screen configuration file for hardcopydir (/etc/screenrc).






            share|improve this answer















            You probably want to do something like:



            screen -p 0 -X hardcopy


            this generates a file hardcopy.0 with the content of the screen session.
            The argument to -p determines which session.



            The files are dumped in screens current working directory or to the directory set set with the hardcopydir command. Check the screen configuration file for hardcopydir (/etc/screenrc).







            share|improve this answer














            share|improve this answer



            share|improve this answer








            edited Dec 14 '13 at 16:03

























            answered Dec 13 '13 at 9:27









            AnthonAnthon

            60.5k17102165




            60.5k17102165








            • 1





              Hi, thanks for your answer! I can't find the hardcopy file.

              – Thaldath
              Dec 13 '13 at 10:21











            • it should be in the directory that you run the command in. Please check your write permissions there and post the version of screen you use (output of screen -v preferably in the question)

              – Anthon
              Dec 13 '13 at 10:27











            • Screen version: 4.00.03jw4 I've got full r/w permission.

              – Thaldath
              Dec 13 '13 at 10:37











            • That is the same version I have, did you cut and paste the command? Run it in a different terminal than the running screen session. Any message from running the command?

              – Anthon
              Dec 13 '13 at 10:51











            • yep, I used the same command. But there is a program running in the screen, I don't know if this change anything or not?

              – Thaldath
              Dec 13 '13 at 13:31














            • 1





              Hi, thanks for your answer! I can't find the hardcopy file.

              – Thaldath
              Dec 13 '13 at 10:21











            • it should be in the directory that you run the command in. Please check your write permissions there and post the version of screen you use (output of screen -v preferably in the question)

              – Anthon
              Dec 13 '13 at 10:27











            • Screen version: 4.00.03jw4 I've got full r/w permission.

              – Thaldath
              Dec 13 '13 at 10:37











            • That is the same version I have, did you cut and paste the command? Run it in a different terminal than the running screen session. Any message from running the command?

              – Anthon
              Dec 13 '13 at 10:51











            • yep, I used the same command. But there is a program running in the screen, I don't know if this change anything or not?

              – Thaldath
              Dec 13 '13 at 13:31








            1




            1





            Hi, thanks for your answer! I can't find the hardcopy file.

            – Thaldath
            Dec 13 '13 at 10:21





            Hi, thanks for your answer! I can't find the hardcopy file.

            – Thaldath
            Dec 13 '13 at 10:21













            it should be in the directory that you run the command in. Please check your write permissions there and post the version of screen you use (output of screen -v preferably in the question)

            – Anthon
            Dec 13 '13 at 10:27





            it should be in the directory that you run the command in. Please check your write permissions there and post the version of screen you use (output of screen -v preferably in the question)

            – Anthon
            Dec 13 '13 at 10:27













            Screen version: 4.00.03jw4 I've got full r/w permission.

            – Thaldath
            Dec 13 '13 at 10:37





            Screen version: 4.00.03jw4 I've got full r/w permission.

            – Thaldath
            Dec 13 '13 at 10:37













            That is the same version I have, did you cut and paste the command? Run it in a different terminal than the running screen session. Any message from running the command?

            – Anthon
            Dec 13 '13 at 10:51





            That is the same version I have, did you cut and paste the command? Run it in a different terminal than the running screen session. Any message from running the command?

            – Anthon
            Dec 13 '13 at 10:51













            yep, I used the same command. But there is a program running in the screen, I don't know if this change anything or not?

            – Thaldath
            Dec 13 '13 at 13:31





            yep, I used the same command. But there is a program running in the screen, I don't know if this change anything or not?

            – Thaldath
            Dec 13 '13 at 13:31













            0














            If you're finding that the above doesn't seem to work, or it works and yet you can't seem to find the danged file, you can do this from inside the session itself:



            CTRL+A



            CTRL+SHIFT+:



            hardcopy -h /some/path/you/can/reach



            That should work and lets you put it wherever you want.






            share|improve this answer




























              0














              If you're finding that the above doesn't seem to work, or it works and yet you can't seem to find the danged file, you can do this from inside the session itself:



              CTRL+A



              CTRL+SHIFT+:



              hardcopy -h /some/path/you/can/reach



              That should work and lets you put it wherever you want.






              share|improve this answer


























                0












                0








                0







                If you're finding that the above doesn't seem to work, or it works and yet you can't seem to find the danged file, you can do this from inside the session itself:



                CTRL+A



                CTRL+SHIFT+:



                hardcopy -h /some/path/you/can/reach



                That should work and lets you put it wherever you want.






                share|improve this answer













                If you're finding that the above doesn't seem to work, or it works and yet you can't seem to find the danged file, you can do this from inside the session itself:



                CTRL+A



                CTRL+SHIFT+:



                hardcopy -h /some/path/you/can/reach



                That should work and lets you put it wherever you want.







                share|improve this answer












                share|improve this answer



                share|improve this answer










                answered 3 hours ago









                mlissnermlissner

                123118




                123118






























                    draft saved

                    draft discarded




















































                    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.




                    draft saved


                    draft discarded














                    StackExchange.ready(
                    function () {
                    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f104984%2fexport-content-of-screen-daemon-to-file%23new-answer', 'question_page');
                    }
                    );

                    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







                    Popular posts from this blog

                    Accessing regular linux commands in Huawei's Dopra Linux

                    Can't connect RFCOMM socket: Host is down

                    Kernel panic - not syncing: Fatal Exception in Interrupt