printf and backspace

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











up vote
0
down vote

favorite












I thought of playing around a bit with find -fprintf. In case you don't know what -fprintf does, it is the same as -printf but writing to a file you specify its name.



Now, when I run a command like this:



find -maxdepth 1 -type d -fprintf output "%pbn"


I get the following in output (using vim and pretty much any text editor):



.^H
./directory-1^H
./directory-2^H
./directory-3^H


I understand that ^H is the backspace character. Opening output with less:



./directory-
./directory-
./directory-


So, the question is: Why do vim and other text editors (tried nano, and emacs) display the backspace without interpreting it by removing the character before it but less does?



I'm running this on my machine (laptop) without sshing anywhere. Using GNU/Linux Ubuntu 16.04 LTS with konsole and tmux.



Thanks in advance.










share|improve this question

























    up vote
    0
    down vote

    favorite












    I thought of playing around a bit with find -fprintf. In case you don't know what -fprintf does, it is the same as -printf but writing to a file you specify its name.



    Now, when I run a command like this:



    find -maxdepth 1 -type d -fprintf output "%pbn"


    I get the following in output (using vim and pretty much any text editor):



    .^H
    ./directory-1^H
    ./directory-2^H
    ./directory-3^H


    I understand that ^H is the backspace character. Opening output with less:



    ./directory-
    ./directory-
    ./directory-


    So, the question is: Why do vim and other text editors (tried nano, and emacs) display the backspace without interpreting it by removing the character before it but less does?



    I'm running this on my machine (laptop) without sshing anywhere. Using GNU/Linux Ubuntu 16.04 LTS with konsole and tmux.



    Thanks in advance.










    share|improve this question























      up vote
      0
      down vote

      favorite









      up vote
      0
      down vote

      favorite











      I thought of playing around a bit with find -fprintf. In case you don't know what -fprintf does, it is the same as -printf but writing to a file you specify its name.



      Now, when I run a command like this:



      find -maxdepth 1 -type d -fprintf output "%pbn"


      I get the following in output (using vim and pretty much any text editor):



      .^H
      ./directory-1^H
      ./directory-2^H
      ./directory-3^H


      I understand that ^H is the backspace character. Opening output with less:



      ./directory-
      ./directory-
      ./directory-


      So, the question is: Why do vim and other text editors (tried nano, and emacs) display the backspace without interpreting it by removing the character before it but less does?



      I'm running this on my machine (laptop) without sshing anywhere. Using GNU/Linux Ubuntu 16.04 LTS with konsole and tmux.



      Thanks in advance.










      share|improve this question













      I thought of playing around a bit with find -fprintf. In case you don't know what -fprintf does, it is the same as -printf but writing to a file you specify its name.



      Now, when I run a command like this:



      find -maxdepth 1 -type d -fprintf output "%pbn"


      I get the following in output (using vim and pretty much any text editor):



      .^H
      ./directory-1^H
      ./directory-2^H
      ./directory-3^H


      I understand that ^H is the backspace character. Opening output with less:



      ./directory-
      ./directory-
      ./directory-


      So, the question is: Why do vim and other text editors (tried nano, and emacs) display the backspace without interpreting it by removing the character before it but less does?



      I'm running this on my machine (laptop) without sshing anywhere. Using GNU/Linux Ubuntu 16.04 LTS with konsole and tmux.



      Thanks in advance.







      vim less editors






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked 10 mins ago









      joker

      1816




      1816

























          active

          oldest

          votes











          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',
          convertImagesToLinks: false,
          noModals: false,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: null,
          bindNavPrevention: true,
          postfix: "",
          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%2f475883%2fprintf-and-backspace%23new-answer', 'question_page');

          );

          Post as a guest



































          active

          oldest

          votes













          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes















           

          draft saved


          draft discarded















































           


          draft saved


          draft discarded














          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f475883%2fprintf-and-backspace%23new-answer', 'question_page');

          );

          Post as a guest













































































          Popular posts from this blog

          Peggy Mitchell

          Palaiologos

          The Forum (Inglewood, California)