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

      135k19289490




      135k19289490










      asked Nov 28 at 4:11









      user23

      435




      435




      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




























            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

























              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























                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












                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












                share|improve this answer



                share|improve this answer










                answered Nov 28 at 4:25









                user117197

                11




                11















                    Popular posts from this blog

                    How to change which sound is reproduced for terminal bell?

                    Title Spacing in Bjornstrup Chapter, Removing Chapter Number From Contents

                    Can I use Tabulator js library in my java Spring + Thymeleaf project?