Run `ls` recursively with wildcardsEmail file and folder list with size?Recursively list full absolute path...

Microchip documentation does not label CAN buss pins on micro controller pinout diagram

Does the Linux kernel need a file system to run?

Is it necessary to use pronouns with the verb "essere"?

What's the name of the logical fallacy where a debater extends a statement far beyond the original statement to make it true?

Why does the Sun have different day lengths, but not the gas giants?

Which was the first story featuring espers?

Does "he squandered his car on drink" sound natural?

How much theory knowledge is actually used while playing?

Doesn't the system of the Supreme Court oppose justice?

Why is it that I can sometimes guess the next note?

How to explain what's wrong with this application of the chain rule?

How can ping know if my host is down

When were female captains banned from Starfleet?

How do you make your own symbol when Detexify fails?

awk assign to multiple variables at once

Creating two special characters

A Trivial Diagnosis

What (the heck) is a Super Worm Equinox Moon?

How could a planet have erratic days?

Why should universal income be universal?

How to preserve electronics (computers, iPads and phones) for hundreds of years

What does "Scientists rise up against statistical significance" mean? (Comment in Nature)

Why is so much work done on numerical verification of the Riemann Hypothesis?

How to make money from a browser who sees 5 seconds into the future of any web page?



Run `ls` recursively with wildcards


Email file and folder list with size?Recursively list full absolute path of files with permissions in LinuxLinux: Trying to find files from a list recursively and copy them somewhere elseList files of folder page by page with LS command'find -mtime' fails to return results that 'ls -l' show are thereGNU find include parent directoriesCalling bash script recursively with different parametersUsing wildcards with cat append targetRecursively execute Linux 'ar' commandrecursively wget in specific folder













0















I'm trying to find all the project files of a particular file type with:



ls -ltR *.mb


I know there are the files I want in several folders, but I get no results back. What did I do wrong?










share|improve this question









New contributor




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

























    0















    I'm trying to find all the project files of a particular file type with:



    ls -ltR *.mb


    I know there are the files I want in several folders, but I get no results back. What did I do wrong?










    share|improve this question









    New contributor




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























      0












      0








      0








      I'm trying to find all the project files of a particular file type with:



      ls -ltR *.mb


      I know there are the files I want in several folders, but I get no results back. What did I do wrong?










      share|improve this question









      New contributor




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












      I'm trying to find all the project files of a particular file type with:



      ls -ltR *.mb


      I know there are the files I want in several folders, but I get no results back. What did I do wrong?







      linux bash ls wildcards






      share|improve this question









      New contributor




      whatIsLife 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 question









      New contributor




      whatIsLife 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 question




      share|improve this question








      edited 3 mins ago









      phuclv

      10.3k64295




      10.3k64295






      New contributor




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









      asked 3 hours ago









      whatIsLifewhatIsLife

      11




      11




      New contributor




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





      New contributor





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






      whatIsLife 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


















          0














          ls doesn't match patterns. It simply list the files or folders in the input arguments. *.mb is expanded by the shell before passing to ls, therefore if there are no files named *.mb in the current directory, nothing will be output, otherwise only files in the current directory will be output



          The standard way to list recursively is to use find



          find . -name '*.mb' -type f -printf "%-.22T+ %M %n %-8u %-8g %8s %Tx %.8TX %pn" | sort | cut -f 2- -d ' '


          This way you can customize the output list format as you want. See: List files by last edited date





          An alternative way is to use globstar which can be enabled with shopt -s globstar



          ls -ltR **/*.mb


          The first **/ will match any arbitrary subdirectory paths. Then *.mb with match your files in those directories






          • globstar



            If set, the pattern ** used in a filename expansion context will match all files and zero or more directories and subdirectories. If the pattern is followed by a /, only directories and subdirectories match.




          https://www.gnu.org/software/bash/manual/html_node/The-Shopt-Builtin.html







          share|improve this answer























            Your Answer








            StackExchange.ready(function() {
            var channelOptions = {
            tags: "".split(" "),
            id: "3"
            };
            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: true,
            noModals: true,
            showLowRepImageUploadWarning: true,
            reputationToPostImages: 10,
            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
            });


            }
            });






            whatIsLife 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%2fsuperuser.com%2fquestions%2f1416177%2frun-ls-recursively-with-wildcards%23new-answer', 'question_page');
            }
            );

            Post as a guest















            Required, but never shown

























            1 Answer
            1






            active

            oldest

            votes








            1 Answer
            1






            active

            oldest

            votes









            active

            oldest

            votes






            active

            oldest

            votes









            0














            ls doesn't match patterns. It simply list the files or folders in the input arguments. *.mb is expanded by the shell before passing to ls, therefore if there are no files named *.mb in the current directory, nothing will be output, otherwise only files in the current directory will be output



            The standard way to list recursively is to use find



            find . -name '*.mb' -type f -printf "%-.22T+ %M %n %-8u %-8g %8s %Tx %.8TX %pn" | sort | cut -f 2- -d ' '


            This way you can customize the output list format as you want. See: List files by last edited date





            An alternative way is to use globstar which can be enabled with shopt -s globstar



            ls -ltR **/*.mb


            The first **/ will match any arbitrary subdirectory paths. Then *.mb with match your files in those directories






            • globstar



              If set, the pattern ** used in a filename expansion context will match all files and zero or more directories and subdirectories. If the pattern is followed by a /, only directories and subdirectories match.




            https://www.gnu.org/software/bash/manual/html_node/The-Shopt-Builtin.html







            share|improve this answer




























              0














              ls doesn't match patterns. It simply list the files or folders in the input arguments. *.mb is expanded by the shell before passing to ls, therefore if there are no files named *.mb in the current directory, nothing will be output, otherwise only files in the current directory will be output



              The standard way to list recursively is to use find



              find . -name '*.mb' -type f -printf "%-.22T+ %M %n %-8u %-8g %8s %Tx %.8TX %pn" | sort | cut -f 2- -d ' '


              This way you can customize the output list format as you want. See: List files by last edited date





              An alternative way is to use globstar which can be enabled with shopt -s globstar



              ls -ltR **/*.mb


              The first **/ will match any arbitrary subdirectory paths. Then *.mb with match your files in those directories






              • globstar



                If set, the pattern ** used in a filename expansion context will match all files and zero or more directories and subdirectories. If the pattern is followed by a /, only directories and subdirectories match.




              https://www.gnu.org/software/bash/manual/html_node/The-Shopt-Builtin.html







              share|improve this answer


























                0












                0








                0







                ls doesn't match patterns. It simply list the files or folders in the input arguments. *.mb is expanded by the shell before passing to ls, therefore if there are no files named *.mb in the current directory, nothing will be output, otherwise only files in the current directory will be output



                The standard way to list recursively is to use find



                find . -name '*.mb' -type f -printf "%-.22T+ %M %n %-8u %-8g %8s %Tx %.8TX %pn" | sort | cut -f 2- -d ' '


                This way you can customize the output list format as you want. See: List files by last edited date





                An alternative way is to use globstar which can be enabled with shopt -s globstar



                ls -ltR **/*.mb


                The first **/ will match any arbitrary subdirectory paths. Then *.mb with match your files in those directories






                • globstar



                  If set, the pattern ** used in a filename expansion context will match all files and zero or more directories and subdirectories. If the pattern is followed by a /, only directories and subdirectories match.




                https://www.gnu.org/software/bash/manual/html_node/The-Shopt-Builtin.html







                share|improve this answer













                ls doesn't match patterns. It simply list the files or folders in the input arguments. *.mb is expanded by the shell before passing to ls, therefore if there are no files named *.mb in the current directory, nothing will be output, otherwise only files in the current directory will be output



                The standard way to list recursively is to use find



                find . -name '*.mb' -type f -printf "%-.22T+ %M %n %-8u %-8g %8s %Tx %.8TX %pn" | sort | cut -f 2- -d ' '


                This way you can customize the output list format as you want. See: List files by last edited date





                An alternative way is to use globstar which can be enabled with shopt -s globstar



                ls -ltR **/*.mb


                The first **/ will match any arbitrary subdirectory paths. Then *.mb with match your files in those directories






                • globstar



                  If set, the pattern ** used in a filename expansion context will match all files and zero or more directories and subdirectories. If the pattern is followed by a /, only directories and subdirectories match.




                https://www.gnu.org/software/bash/manual/html_node/The-Shopt-Builtin.html








                share|improve this answer












                share|improve this answer



                share|improve this answer










                answered 1 hour ago









                phuclvphuclv

                10.3k64295




                10.3k64295






















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










                    draft saved

                    draft discarded


















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













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












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
















                    Thanks for contributing an answer to Super User!


                    • 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%2fsuperuser.com%2fquestions%2f1416177%2frun-ls-recursively-with-wildcards%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

                    VNC viewer RFB protocol error: bad desktop size 0x0I Cannot Type the Key 'd' (lowercase) in VNC Viewer...

                    Tribunal Administrativo e Fiscal de Mirandela Referências Menu de...

                    looking for continuous Screen Capture for retroactivly reproducing errors, timeback machineRolling desktop...