Does ls -R make any sense with -d?
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty{ margin-bottom:0;
}
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
add a comment |
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
in simple experimentation,-d
overrides-R
...
– Jeff Schaller♦
May 19 at 14:19
... for the particular implementation(s) ofls
you experimented with.
– Henning Makholm
May 19 at 19:50
add a comment |
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
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
ls
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) ofls
you experimented with.
– Henning Makholm
May 19 at 19:50
add a comment |
in simple experimentation,-d
overrides-R
...
– Jeff Schaller♦
May 19 at 14:19
... for the particular implementation(s) ofls
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
add a comment |
1 Answer
1
active
oldest
votes
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.
add a comment |
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
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
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
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.
add a comment |
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.
add a comment |
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.
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.
answered May 19 at 14:54
murumuru
41.6k5 gold badges101 silver badges175 bronze badges
41.6k5 gold badges101 silver badges175 bronze badges
add a comment |
add a comment |
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.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
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
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
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
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