Does ls -R make any sense with -d?





.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty{ margin-bottom:0;
}







4















I tried to use ls -dR but I don't see any difference with ls -d. Does -R do anything when there's also -d?










share|improve this question

























  • in simple experimentation, -d overrides -R ...

    – Jeff Schaller
    May 19 at 14:19











  • ... for the particular implementation(s) of ls you experimented with.

    – Henning Makholm
    May 19 at 19:50


















4















I tried to use ls -dR but I don't see any difference with ls -d. Does -R do anything when there's also -d?










share|improve this question

























  • in simple experimentation, -d overrides -R ...

    – Jeff Schaller
    May 19 at 14:19











  • ... for the particular implementation(s) of ls you experimented with.

    – Henning Makholm
    May 19 at 19:50














4












4








4








I tried to use ls -dR but I don't see any difference with ls -d. Does -R do anything when there's also -d?










share|improve this question
















I tried to use ls -dR but I don't see any difference with ls -d. Does -R do anything when there's also -d?







ls






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited May 19 at 14:17









Jeff Schaller

47.6k11 gold badges69 silver badges154 bronze badges




47.6k11 gold badges69 silver badges154 bronze badges










asked May 19 at 14:07









mayan.ryanmayan.ryan

241 bronze badge




241 bronze badge













  • in simple experimentation, -d overrides -R ...

    – Jeff Schaller
    May 19 at 14:19











  • ... for the particular implementation(s) of ls you experimented with.

    – Henning Makholm
    May 19 at 19:50



















  • in simple experimentation, -d overrides -R ...

    – Jeff Schaller
    May 19 at 14:19











  • ... for the particular implementation(s) of ls you experimented with.

    – Henning Makholm
    May 19 at 19:50

















in simple experimentation, -d overrides -R ...

– Jeff Schaller
May 19 at 14:19





in simple experimentation, -d overrides -R ...

– Jeff Schaller
May 19 at 14:19













... for the particular implementation(s) of ls you experimented with.

– Henning Makholm
May 19 at 19:50





... for the particular implementation(s) of ls you experimented with.

– Henning Makholm
May 19 at 19:50










1 Answer
1






active

oldest

votes


















5














POSIX says:




-R

Recursively list subdirectories encountered. When a symbolic link to a
directory is encountered, the directory shall not be recursively
listed unless the -L option is specified. The use of -R with
-d or -f produces unspecified results.




And that:




This volume of POSIX.1-2017 is frequently silent about what happens
when mutually-exclusive options are specified. Except for -R, -d, and
-f, the ls utility is required to accept multiple options from each mutually-exclusive option set without treating them as errors and to
use the behavior specified by the last option given in each
mutually-exclusive set.




So, it may or may not make sense.






share|improve this answer


























    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',
    autoActivateHeartbeat: false,
    convertImagesToLinks: false,
    noModals: true,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: null,
    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
    });


    }
    });














    draft saved

    draft discarded


















    StackExchange.ready(
    function () {
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f519802%2fdoes-ls-r-make-any-sense-with-d%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









    5














    POSIX says:




    -R

    Recursively list subdirectories encountered. When a symbolic link to a
    directory is encountered, the directory shall not be recursively
    listed unless the -L option is specified. The use of -R with
    -d or -f produces unspecified results.




    And that:




    This volume of POSIX.1-2017 is frequently silent about what happens
    when mutually-exclusive options are specified. Except for -R, -d, and
    -f, the ls utility is required to accept multiple options from each mutually-exclusive option set without treating them as errors and to
    use the behavior specified by the last option given in each
    mutually-exclusive set.




    So, it may or may not make sense.






    share|improve this answer




























      5














      POSIX says:




      -R

      Recursively list subdirectories encountered. When a symbolic link to a
      directory is encountered, the directory shall not be recursively
      listed unless the -L option is specified. The use of -R with
      -d or -f produces unspecified results.




      And that:




      This volume of POSIX.1-2017 is frequently silent about what happens
      when mutually-exclusive options are specified. Except for -R, -d, and
      -f, the ls utility is required to accept multiple options from each mutually-exclusive option set without treating them as errors and to
      use the behavior specified by the last option given in each
      mutually-exclusive set.




      So, it may or may not make sense.






      share|improve this answer


























        5












        5








        5







        POSIX says:




        -R

        Recursively list subdirectories encountered. When a symbolic link to a
        directory is encountered, the directory shall not be recursively
        listed unless the -L option is specified. The use of -R with
        -d or -f produces unspecified results.




        And that:




        This volume of POSIX.1-2017 is frequently silent about what happens
        when mutually-exclusive options are specified. Except for -R, -d, and
        -f, the ls utility is required to accept multiple options from each mutually-exclusive option set without treating them as errors and to
        use the behavior specified by the last option given in each
        mutually-exclusive set.




        So, it may or may not make sense.






        share|improve this answer













        POSIX says:




        -R

        Recursively list subdirectories encountered. When a symbolic link to a
        directory is encountered, the directory shall not be recursively
        listed unless the -L option is specified. The use of -R with
        -d or -f produces unspecified results.




        And that:




        This volume of POSIX.1-2017 is frequently silent about what happens
        when mutually-exclusive options are specified. Except for -R, -d, and
        -f, the ls utility is required to accept multiple options from each mutually-exclusive option set without treating them as errors and to
        use the behavior specified by the last option given in each
        mutually-exclusive set.




        So, it may or may not make sense.







        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered May 19 at 14:54









        murumuru

        41.6k5 gold badges101 silver badges175 bronze badges




        41.6k5 gold badges101 silver badges175 bronze badges






























            draft saved

            draft discarded




















































            Thanks for contributing an answer to Unix & Linux Stack Exchange!


            • 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%2funix.stackexchange.com%2fquestions%2f519802%2fdoes-ls-r-make-any-sense-with-d%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

            He _____ here since 1970 . Answer needed [closed]What does “since he was so high” mean?Meaning of “catch birds for”?How do I ensure “since” takes the meaning I want?“Who cares here” meaningWhat does “right round toward” mean?the time tense (had now been detected)What does the phrase “ring around the roses” mean here?Correct usage of “visited upon”Meaning of “foiled rail sabotage bid”It was the third time I had gone to Rome or It is the third time I had been to Rome

            Bunad

            Færeyskur hestur Heimild | Tengill | Tilvísanir | LeiðsagnarvalRossið - síða um færeyska hrossið á færeyskuGott ár hjá færeyska hestinum