Deleting all the listed files [duplicate]











up vote
0
down vote

favorite













This question already has an answer here:




  • How to delete all files that are returned by locate

    3 answers




I used locate <filename> in order to see where are all the files with <filename>. Is there a command to delete all the files with that <filename>?
For example, I want to delete all the files with the name qownnotes as in image enter image description here










share|improve this question















marked as duplicate by muru command-line
Users with the  command-line badge can single-handedly close command-line questions as duplicates and reopen them as needed.

StackExchange.ready(function() {
if (StackExchange.options.isMobile) return;

$('.dupe-hammer-message-hover:not(.hover-bound)').each(function() {
var $hover = $(this).addClass('hover-bound'),
$msg = $hover.siblings('.dupe-hammer-message');

$hover.hover(
function() {
$hover.showInfoMessage('', {
messageElement: $msg.clone().show(),
transient: false,
position: { my: 'bottom left', at: 'top center', offsetTop: -7 },
dismissable: false,
relativeToBody: true
});
},
function() {
StackExchange.helpers.removeMessages();
}
);
});
});
Nov 28 at 5:58


This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.



















    up vote
    0
    down vote

    favorite













    This question already has an answer here:




    • How to delete all files that are returned by locate

      3 answers




    I used locate <filename> in order to see where are all the files with <filename>. Is there a command to delete all the files with that <filename>?
    For example, I want to delete all the files with the name qownnotes as in image enter image description here










    share|improve this question















    marked as duplicate by muru command-line
    Users with the  command-line badge can single-handedly close command-line questions as duplicates and reopen them as needed.

    StackExchange.ready(function() {
    if (StackExchange.options.isMobile) return;

    $('.dupe-hammer-message-hover:not(.hover-bound)').each(function() {
    var $hover = $(this).addClass('hover-bound'),
    $msg = $hover.siblings('.dupe-hammer-message');

    $hover.hover(
    function() {
    $hover.showInfoMessage('', {
    messageElement: $msg.clone().show(),
    transient: false,
    position: { my: 'bottom left', at: 'top center', offsetTop: -7 },
    dismissable: false,
    relativeToBody: true
    });
    },
    function() {
    StackExchange.helpers.removeMessages();
    }
    );
    });
    });
    Nov 28 at 5:58


    This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

















      up vote
      0
      down vote

      favorite









      up vote
      0
      down vote

      favorite












      This question already has an answer here:




      • How to delete all files that are returned by locate

        3 answers




      I used locate <filename> in order to see where are all the files with <filename>. Is there a command to delete all the files with that <filename>?
      For example, I want to delete all the files with the name qownnotes as in image enter image description here










      share|improve this question
















      This question already has an answer here:




      • How to delete all files that are returned by locate

        3 answers




      I used locate <filename> in order to see where are all the files with <filename>. Is there a command to delete all the files with that <filename>?
      For example, I want to delete all the files with the name qownnotes as in image enter image description here





      This question already has an answer here:




      • How to delete all files that are returned by locate

        3 answers








      command-line delete locate






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Nov 28 at 5:58









      muru

      134k19285484




      134k19285484










      asked Nov 28 at 4:11









      user23

      354




      354




      marked as duplicate by muru command-line
      Users with the  command-line badge can single-handedly close command-line questions as duplicates and reopen them as needed.

      StackExchange.ready(function() {
      if (StackExchange.options.isMobile) return;

      $('.dupe-hammer-message-hover:not(.hover-bound)').each(function() {
      var $hover = $(this).addClass('hover-bound'),
      $msg = $hover.siblings('.dupe-hammer-message');

      $hover.hover(
      function() {
      $hover.showInfoMessage('', {
      messageElement: $msg.clone().show(),
      transient: false,
      position: { my: 'bottom left', at: 'top center', offsetTop: -7 },
      dismissable: false,
      relativeToBody: true
      });
      },
      function() {
      StackExchange.helpers.removeMessages();
      }
      );
      });
      });
      Nov 28 at 5:58


      This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.






      marked as duplicate by muru command-line
      Users with the  command-line badge can single-handedly close command-line questions as duplicates and reopen them as needed.

      StackExchange.ready(function() {
      if (StackExchange.options.isMobile) return;

      $('.dupe-hammer-message-hover:not(.hover-bound)').each(function() {
      var $hover = $(this).addClass('hover-bound'),
      $msg = $hover.siblings('.dupe-hammer-message');

      $hover.hover(
      function() {
      $hover.showInfoMessage('', {
      messageElement: $msg.clone().show(),
      transient: false,
      position: { my: 'bottom left', at: 'top center', offsetTop: -7 },
      dismissable: false,
      relativeToBody: true
      });
      },
      function() {
      StackExchange.helpers.removeMessages();
      }
      );
      });
      });
      Nov 28 at 5:58


      This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.
























          1 Answer
          1






          active

          oldest

          votes

















          up vote
          0
          down vote













          Using the find command, you can do a search for and subsequently execute an action.



          find / -iname *qownnotes* -exec rm -rf {} ;


          This above command searches the file system, starting at the root level, case insensitive in the name, and matches files or directories. The qownnotes string can be at any place in the file or directory name, indicated by the first escaped asterisk and the ending escaped asterisk.



          When it finds a match, it will execute the remove command, with the recursive and force attributes. The search results will populate into the brackets, and the ending slash and semicolon prevent escaping.



          As written above, it will remove all files it finds without confirmation, so be sure it is what you're wanting to do before running it.






          share|improve this answer








          New contributor




          user117197 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
          Check out our Code of Conduct.

























            1 Answer
            1






            active

            oldest

            votes








            1 Answer
            1






            active

            oldest

            votes









            active

            oldest

            votes






            active

            oldest

            votes








            up vote
            0
            down vote













            Using the find command, you can do a search for and subsequently execute an action.



            find / -iname *qownnotes* -exec rm -rf {} ;


            This above command searches the file system, starting at the root level, case insensitive in the name, and matches files or directories. The qownnotes string can be at any place in the file or directory name, indicated by the first escaped asterisk and the ending escaped asterisk.



            When it finds a match, it will execute the remove command, with the recursive and force attributes. The search results will populate into the brackets, and the ending slash and semicolon prevent escaping.



            As written above, it will remove all files it finds without confirmation, so be sure it is what you're wanting to do before running it.






            share|improve this answer








            New contributor




            user117197 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
            Check out our Code of Conduct.






















              up vote
              0
              down vote













              Using the find command, you can do a search for and subsequently execute an action.



              find / -iname *qownnotes* -exec rm -rf {} ;


              This above command searches the file system, starting at the root level, case insensitive in the name, and matches files or directories. The qownnotes string can be at any place in the file or directory name, indicated by the first escaped asterisk and the ending escaped asterisk.



              When it finds a match, it will execute the remove command, with the recursive and force attributes. The search results will populate into the brackets, and the ending slash and semicolon prevent escaping.



              As written above, it will remove all files it finds without confirmation, so be sure it is what you're wanting to do before running it.






              share|improve this answer








              New contributor




              user117197 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
              Check out our Code of Conduct.




















                up vote
                0
                down vote










                up vote
                0
                down vote









                Using the find command, you can do a search for and subsequently execute an action.



                find / -iname *qownnotes* -exec rm -rf {} ;


                This above command searches the file system, starting at the root level, case insensitive in the name, and matches files or directories. The qownnotes string can be at any place in the file or directory name, indicated by the first escaped asterisk and the ending escaped asterisk.



                When it finds a match, it will execute the remove command, with the recursive and force attributes. The search results will populate into the brackets, and the ending slash and semicolon prevent escaping.



                As written above, it will remove all files it finds without confirmation, so be sure it is what you're wanting to do before running it.






                share|improve this answer








                New contributor




                user117197 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                Check out our Code of Conduct.









                Using the find command, you can do a search for and subsequently execute an action.



                find / -iname *qownnotes* -exec rm -rf {} ;


                This above command searches the file system, starting at the root level, case insensitive in the name, and matches files or directories. The qownnotes string can be at any place in the file or directory name, indicated by the first escaped asterisk and the ending escaped asterisk.



                When it finds a match, it will execute the remove command, with the recursive and force attributes. The search results will populate into the brackets, and the ending slash and semicolon prevent escaping.



                As written above, it will remove all files it finds without confirmation, so be sure it is what you're wanting to do before running it.







                share|improve this answer








                New contributor




                user117197 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                Check out our Code of Conduct.









                share|improve this answer



                share|improve this answer






                New contributor




                user117197 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                Check out our Code of Conduct.









                answered Nov 28 at 4:25









                user117197

                11




                11




                New contributor




                user117197 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                Check out our Code of Conduct.





                New contributor





                user117197 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                Check out our Code of Conduct.






                user117197 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                Check out our Code of Conduct.















                    Popular posts from this blog

                    數位音樂下載

                    When can things happen in Etherscan, such as the picture below?

                    格利澤436b