How do I use yes with e2fsck?

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP












3














I have tried the following with both LinuxMint 13 Cinnamon 32 bit and Trisquel 7.0 Gnome 32 bit and get the same error message:



$ yes | sudo e2fsck /dev/sdax
e2fsck 1.42 (29-Nov-2011)
e2fsck: need terminal for interactive repairs


In each case, the partition /dev/sdax was not mounted.



Is it not possible to use yes with e2fsck?










share|improve this question





















  • yes - output a string repeatedly until killed what is the reason to use it here?
    – Costas
    Jan 20 '15 at 12:06






  • 3




    Based on the error message, I guess it insists on a terminal. Could you trick it in order to be able to use yes with it? Maybe, but you don't need to: it already has a -y option that does the same thing.
    – Celada
    Jan 20 '15 at 12:06










  • @Costas: I'd much rather have a program keep feeding 'y' to e2fsck than having to type it over and over again when there are file system errors.
    – Don Nadie
    Jan 22 '15 at 16:32















3














I have tried the following with both LinuxMint 13 Cinnamon 32 bit and Trisquel 7.0 Gnome 32 bit and get the same error message:



$ yes | sudo e2fsck /dev/sdax
e2fsck 1.42 (29-Nov-2011)
e2fsck: need terminal for interactive repairs


In each case, the partition /dev/sdax was not mounted.



Is it not possible to use yes with e2fsck?










share|improve this question





















  • yes - output a string repeatedly until killed what is the reason to use it here?
    – Costas
    Jan 20 '15 at 12:06






  • 3




    Based on the error message, I guess it insists on a terminal. Could you trick it in order to be able to use yes with it? Maybe, but you don't need to: it already has a -y option that does the same thing.
    – Celada
    Jan 20 '15 at 12:06










  • @Costas: I'd much rather have a program keep feeding 'y' to e2fsck than having to type it over and over again when there are file system errors.
    – Don Nadie
    Jan 22 '15 at 16:32













3












3








3







I have tried the following with both LinuxMint 13 Cinnamon 32 bit and Trisquel 7.0 Gnome 32 bit and get the same error message:



$ yes | sudo e2fsck /dev/sdax
e2fsck 1.42 (29-Nov-2011)
e2fsck: need terminal for interactive repairs


In each case, the partition /dev/sdax was not mounted.



Is it not possible to use yes with e2fsck?










share|improve this question













I have tried the following with both LinuxMint 13 Cinnamon 32 bit and Trisquel 7.0 Gnome 32 bit and get the same error message:



$ yes | sudo e2fsck /dev/sdax
e2fsck 1.42 (29-Nov-2011)
e2fsck: need terminal for interactive repairs


In each case, the partition /dev/sdax was not mounted.



Is it not possible to use yes with e2fsck?







linux e2fsck






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Jan 20 '15 at 12:03









Don Nadie

5017




5017











  • yes - output a string repeatedly until killed what is the reason to use it here?
    – Costas
    Jan 20 '15 at 12:06






  • 3




    Based on the error message, I guess it insists on a terminal. Could you trick it in order to be able to use yes with it? Maybe, but you don't need to: it already has a -y option that does the same thing.
    – Celada
    Jan 20 '15 at 12:06










  • @Costas: I'd much rather have a program keep feeding 'y' to e2fsck than having to type it over and over again when there are file system errors.
    – Don Nadie
    Jan 22 '15 at 16:32
















  • yes - output a string repeatedly until killed what is the reason to use it here?
    – Costas
    Jan 20 '15 at 12:06






  • 3




    Based on the error message, I guess it insists on a terminal. Could you trick it in order to be able to use yes with it? Maybe, but you don't need to: it already has a -y option that does the same thing.
    – Celada
    Jan 20 '15 at 12:06










  • @Costas: I'd much rather have a program keep feeding 'y' to e2fsck than having to type it over and over again when there are file system errors.
    – Don Nadie
    Jan 22 '15 at 16:32















yes - output a string repeatedly until killed what is the reason to use it here?
– Costas
Jan 20 '15 at 12:06




yes - output a string repeatedly until killed what is the reason to use it here?
– Costas
Jan 20 '15 at 12:06




3




3




Based on the error message, I guess it insists on a terminal. Could you trick it in order to be able to use yes with it? Maybe, but you don't need to: it already has a -y option that does the same thing.
– Celada
Jan 20 '15 at 12:06




Based on the error message, I guess it insists on a terminal. Could you trick it in order to be able to use yes with it? Maybe, but you don't need to: it already has a -y option that does the same thing.
– Celada
Jan 20 '15 at 12:06












@Costas: I'd much rather have a program keep feeding 'y' to e2fsck than having to type it over and over again when there are file system errors.
– Don Nadie
Jan 22 '15 at 16:32




@Costas: I'd much rather have a program keep feeding 'y' to e2fsck than having to type it over and over again when there are file system errors.
– Don Nadie
Jan 22 '15 at 16:32










4 Answers
4






active

oldest

votes


















9














If you are sceptical whether e2fsck -y works for you next time, coins might help.



enter image description here



I used to use this trick when there were no yes or -y or equivalent options in MS-DOS.






share|improve this answer






























    0














    Try using



    sudo e2fsck -y /dev/sdax





    share|improve this answer


















    • 2




      The first solution is exactly equivalent to the nonworking example in the question (other than outputting "yes" instead of "y," which won't make any difference in this case).
      – Doorknob
      Jan 20 '15 at 14:39










    • Yes, I have expected that but I couldn't check it on my drive. But sometimes small details make difference.
      – Szymon Roziewski
      Jan 20 '15 at 15:57










    • In the future, I'll try e2fsck -y /dev/sdax but really won't know if it does what I want until the next time I have file system errors and e2fsck repeatedly asks me if I want to perform its suggested fixes. e2fsck can suggest a lot of fixes when a file system is messed up; I just don't want to type 'y' over and over again when there are lots of errors.
      – Don Nadie
      Jan 22 '15 at 16:42










    • this answer is too short and is not adding anything to the previous answer
      – aliceinwire
      May 12 '17 at 10:52



















    0














    You can try also:



    sudo e2fsck -p /dev/sdax



    See man e2fsck for description of all arguments.






    share|improve this answer




















    • This is something, but it’s not what the question is asking for.
      – G-Man
      Jul 4 at 20:54


















    0














    i had to enter "n" (don't abort) before "yes", so i used script:



    (echo n; yes) | script --return -c "e2fsck /dev/sda1"






    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%2f180036%2fhow-do-i-use-yes-with-e2fsck%23new-answer', 'question_page');

      );

      Post as a guest















      Required, but never shown

























      4 Answers
      4






      active

      oldest

      votes








      4 Answers
      4






      active

      oldest

      votes









      active

      oldest

      votes






      active

      oldest

      votes









      9














      If you are sceptical whether e2fsck -y works for you next time, coins might help.



      enter image description here



      I used to use this trick when there were no yes or -y or equivalent options in MS-DOS.






      share|improve this answer



























        9














        If you are sceptical whether e2fsck -y works for you next time, coins might help.



        enter image description here



        I used to use this trick when there were no yes or -y or equivalent options in MS-DOS.






        share|improve this answer

























          9












          9








          9






          If you are sceptical whether e2fsck -y works for you next time, coins might help.



          enter image description here



          I used to use this trick when there were no yes or -y or equivalent options in MS-DOS.






          share|improve this answer














          If you are sceptical whether e2fsck -y works for you next time, coins might help.



          enter image description here



          I used to use this trick when there were no yes or -y or equivalent options in MS-DOS.







          share|improve this answer














          share|improve this answer



          share|improve this answer








          edited Apr 13 '17 at 12:36









          Community

          1




          1










          answered Feb 10 '15 at 8:17









          cychoi

          285211




          285211























              0














              Try using



              sudo e2fsck -y /dev/sdax





              share|improve this answer


















              • 2




                The first solution is exactly equivalent to the nonworking example in the question (other than outputting "yes" instead of "y," which won't make any difference in this case).
                – Doorknob
                Jan 20 '15 at 14:39










              • Yes, I have expected that but I couldn't check it on my drive. But sometimes small details make difference.
                – Szymon Roziewski
                Jan 20 '15 at 15:57










              • In the future, I'll try e2fsck -y /dev/sdax but really won't know if it does what I want until the next time I have file system errors and e2fsck repeatedly asks me if I want to perform its suggested fixes. e2fsck can suggest a lot of fixes when a file system is messed up; I just don't want to type 'y' over and over again when there are lots of errors.
                – Don Nadie
                Jan 22 '15 at 16:42










              • this answer is too short and is not adding anything to the previous answer
                – aliceinwire
                May 12 '17 at 10:52
















              0














              Try using



              sudo e2fsck -y /dev/sdax





              share|improve this answer


















              • 2




                The first solution is exactly equivalent to the nonworking example in the question (other than outputting "yes" instead of "y," which won't make any difference in this case).
                – Doorknob
                Jan 20 '15 at 14:39










              • Yes, I have expected that but I couldn't check it on my drive. But sometimes small details make difference.
                – Szymon Roziewski
                Jan 20 '15 at 15:57










              • In the future, I'll try e2fsck -y /dev/sdax but really won't know if it does what I want until the next time I have file system errors and e2fsck repeatedly asks me if I want to perform its suggested fixes. e2fsck can suggest a lot of fixes when a file system is messed up; I just don't want to type 'y' over and over again when there are lots of errors.
                – Don Nadie
                Jan 22 '15 at 16:42










              • this answer is too short and is not adding anything to the previous answer
                – aliceinwire
                May 12 '17 at 10:52














              0












              0








              0






              Try using



              sudo e2fsck -y /dev/sdax





              share|improve this answer














              Try using



              sudo e2fsck -y /dev/sdax






              share|improve this answer














              share|improve this answer



              share|improve this answer








              edited Jan 20 '15 at 22:57









              Gilles

              527k12710561580




              527k12710561580










              answered Jan 20 '15 at 12:16









              Szymon Roziewski

              20013




              20013







              • 2




                The first solution is exactly equivalent to the nonworking example in the question (other than outputting "yes" instead of "y," which won't make any difference in this case).
                – Doorknob
                Jan 20 '15 at 14:39










              • Yes, I have expected that but I couldn't check it on my drive. But sometimes small details make difference.
                – Szymon Roziewski
                Jan 20 '15 at 15:57










              • In the future, I'll try e2fsck -y /dev/sdax but really won't know if it does what I want until the next time I have file system errors and e2fsck repeatedly asks me if I want to perform its suggested fixes. e2fsck can suggest a lot of fixes when a file system is messed up; I just don't want to type 'y' over and over again when there are lots of errors.
                – Don Nadie
                Jan 22 '15 at 16:42










              • this answer is too short and is not adding anything to the previous answer
                – aliceinwire
                May 12 '17 at 10:52













              • 2




                The first solution is exactly equivalent to the nonworking example in the question (other than outputting "yes" instead of "y," which won't make any difference in this case).
                – Doorknob
                Jan 20 '15 at 14:39










              • Yes, I have expected that but I couldn't check it on my drive. But sometimes small details make difference.
                – Szymon Roziewski
                Jan 20 '15 at 15:57










              • In the future, I'll try e2fsck -y /dev/sdax but really won't know if it does what I want until the next time I have file system errors and e2fsck repeatedly asks me if I want to perform its suggested fixes. e2fsck can suggest a lot of fixes when a file system is messed up; I just don't want to type 'y' over and over again when there are lots of errors.
                – Don Nadie
                Jan 22 '15 at 16:42










              • this answer is too short and is not adding anything to the previous answer
                – aliceinwire
                May 12 '17 at 10:52








              2




              2




              The first solution is exactly equivalent to the nonworking example in the question (other than outputting "yes" instead of "y," which won't make any difference in this case).
              – Doorknob
              Jan 20 '15 at 14:39




              The first solution is exactly equivalent to the nonworking example in the question (other than outputting "yes" instead of "y," which won't make any difference in this case).
              – Doorknob
              Jan 20 '15 at 14:39












              Yes, I have expected that but I couldn't check it on my drive. But sometimes small details make difference.
              – Szymon Roziewski
              Jan 20 '15 at 15:57




              Yes, I have expected that but I couldn't check it on my drive. But sometimes small details make difference.
              – Szymon Roziewski
              Jan 20 '15 at 15:57












              In the future, I'll try e2fsck -y /dev/sdax but really won't know if it does what I want until the next time I have file system errors and e2fsck repeatedly asks me if I want to perform its suggested fixes. e2fsck can suggest a lot of fixes when a file system is messed up; I just don't want to type 'y' over and over again when there are lots of errors.
              – Don Nadie
              Jan 22 '15 at 16:42




              In the future, I'll try e2fsck -y /dev/sdax but really won't know if it does what I want until the next time I have file system errors and e2fsck repeatedly asks me if I want to perform its suggested fixes. e2fsck can suggest a lot of fixes when a file system is messed up; I just don't want to type 'y' over and over again when there are lots of errors.
              – Don Nadie
              Jan 22 '15 at 16:42












              this answer is too short and is not adding anything to the previous answer
              – aliceinwire
              May 12 '17 at 10:52





              this answer is too short and is not adding anything to the previous answer
              – aliceinwire
              May 12 '17 at 10:52












              0














              You can try also:



              sudo e2fsck -p /dev/sdax



              See man e2fsck for description of all arguments.






              share|improve this answer




















              • This is something, but it’s not what the question is asking for.
                – G-Man
                Jul 4 at 20:54















              0














              You can try also:



              sudo e2fsck -p /dev/sdax



              See man e2fsck for description of all arguments.






              share|improve this answer




















              • This is something, but it’s not what the question is asking for.
                – G-Man
                Jul 4 at 20:54













              0












              0








              0






              You can try also:



              sudo e2fsck -p /dev/sdax



              See man e2fsck for description of all arguments.






              share|improve this answer












              You can try also:



              sudo e2fsck -p /dev/sdax



              See man e2fsck for description of all arguments.







              share|improve this answer












              share|improve this answer



              share|improve this answer










              answered Jul 4 at 20:13









              Joel Matějka

              1




              1











              • This is something, but it’s not what the question is asking for.
                – G-Man
                Jul 4 at 20:54
















              • This is something, but it’s not what the question is asking for.
                – G-Man
                Jul 4 at 20:54















              This is something, but it’s not what the question is asking for.
              – G-Man
              Jul 4 at 20:54




              This is something, but it’s not what the question is asking for.
              – G-Man
              Jul 4 at 20:54











              0














              i had to enter "n" (don't abort) before "yes", so i used script:



              (echo n; yes) | script --return -c "e2fsck /dev/sda1"






              share|improve this answer

























                0














                i had to enter "n" (don't abort) before "yes", so i used script:



                (echo n; yes) | script --return -c "e2fsck /dev/sda1"






                share|improve this answer























                  0












                  0








                  0






                  i had to enter "n" (don't abort) before "yes", so i used script:



                  (echo n; yes) | script --return -c "e2fsck /dev/sda1"






                  share|improve this answer












                  i had to enter "n" (don't abort) before "yes", so i used script:



                  (echo n; yes) | script --return -c "e2fsck /dev/sda1"







                  share|improve this answer












                  share|improve this answer



                  share|improve this answer










                  answered Dec 11 at 19:50









                  Jayen

                  1368




                  1368



























                      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.





                      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.




                      draft saved


                      draft discarded














                      StackExchange.ready(
                      function ()
                      StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f180036%2fhow-do-i-use-yes-with-e2fsck%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

                      How to check contact read email or not when send email to Individual?

                      Bahrain

                      Postfix configuration issue with fips on centos 7; mailgun relay