Find command if filename doesn't exists in directory

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











up vote
0
down vote

favorite












How I want to display the folder that do not have certain file. But the concern is, the file is same name but different cases.



Case study:
In tools directory, there are subdirectories that contain readme/README file and some of them does not have. For example



/toola/readme
/toolb/README
/toolc/ (does not have readme file)



I want find command to display only toolc folder by using this command.



find . -maxdepth 2 ! -name 'readme' -o ! -name 'README' | awk -F "/" 'print $$2' | uniq



But it doesn't work. It display all file since toola doesn't have 'README' and toolb doesn't have 'readme'









share







New contributor




nurul naiemah 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

    favorite












    How I want to display the folder that do not have certain file. But the concern is, the file is same name but different cases.



    Case study:
    In tools directory, there are subdirectories that contain readme/README file and some of them does not have. For example



    /toola/readme
    /toolb/README
    /toolc/ (does not have readme file)



    I want find command to display only toolc folder by using this command.



    find . -maxdepth 2 ! -name 'readme' -o ! -name 'README' | awk -F "/" 'print $$2' | uniq



    But it doesn't work. It display all file since toola doesn't have 'README' and toolb doesn't have 'readme'









    share







    New contributor




    nurul naiemah 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

      favorite









      up vote
      0
      down vote

      favorite











      How I want to display the folder that do not have certain file. But the concern is, the file is same name but different cases.



      Case study:
      In tools directory, there are subdirectories that contain readme/README file and some of them does not have. For example



      /toola/readme
      /toolb/README
      /toolc/ (does not have readme file)



      I want find command to display only toolc folder by using this command.



      find . -maxdepth 2 ! -name 'readme' -o ! -name 'README' | awk -F "/" 'print $$2' | uniq



      But it doesn't work. It display all file since toola doesn't have 'README' and toolb doesn't have 'readme'









      share







      New contributor




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











      How I want to display the folder that do not have certain file. But the concern is, the file is same name but different cases.



      Case study:
      In tools directory, there are subdirectories that contain readme/README file and some of them does not have. For example



      /toola/readme
      /toolb/README
      /toolc/ (does not have readme file)



      I want find command to display only toolc folder by using this command.



      find . -maxdepth 2 ! -name 'readme' -o ! -name 'README' | awk -F "/" 'print $$2' | uniq



      But it doesn't work. It display all file since toola doesn't have 'README' and toolb doesn't have 'readme'







      find





      share







      New contributor




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










      share







      New contributor




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








      share



      share






      New contributor




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









      asked 3 mins ago









      nurul naiemah

      1




      1




      New contributor




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





      New contributor





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






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

























          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
          );



          );






          nurul naiemah is a new contributor. Be nice, and check out our Code of Conduct.









           

          draft saved


          draft discarded


















          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f477412%2ffind-command-if-filename-doesnt-exists-in-directory%23new-answer', 'question_page');

          );

          Post as a guest



































          active

          oldest

          votes













          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes








          nurul naiemah is a new contributor. Be nice, and check out our Code of Conduct.









           

          draft saved


          draft discarded


















          nurul naiemah is a new contributor. Be nice, and check out our Code of Conduct.












          nurul naiemah is a new contributor. Be nice, and check out our Code of Conduct.











          nurul naiemah is a new contributor. Be nice, and check out our Code of Conduct.













           


          draft saved


          draft discarded














          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f477412%2ffind-command-if-filename-doesnt-exists-in-directory%23new-answer', 'question_page');

          );

          Post as a guest













































































          Popular posts from this blog

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

          Displaying single band from multi-band raster using QGIS

          How many registers does an x86_64 CPU actually have?