Why `ls -d` only demonstrate `.`?
Clash Royale CLAN TAG#URR8PPP
up vote
0
down vote
favorite
I'd like to only the directory
$ ls -d
.
#get . on macos
and the same on centos
[root@iz2ze9wve43n2nyuvmsfx5z ~]# ls -d .
.
I find the solution:
[root@iz2ze9wve43n2nyuvmsfx5z /]# ls -d */
bin/ dev/ home/ lib64/ media/ opt/ root/ sbin/ sys/ usr/
boot/ etc/ lib/ lost+found/ mnt/ proc/ run/ srv/ tmp/ var/
but the manual specify
-d, --directory
list directories themselves, not their contents
What's the reason -d
perform this way?
bash
New contributor
add a comment |Â
up vote
0
down vote
favorite
I'd like to only the directory
$ ls -d
.
#get . on macos
and the same on centos
[root@iz2ze9wve43n2nyuvmsfx5z ~]# ls -d .
.
I find the solution:
[root@iz2ze9wve43n2nyuvmsfx5z /]# ls -d */
bin/ dev/ home/ lib64/ media/ opt/ root/ sbin/ sys/ usr/
boot/ etc/ lib/ lost+found/ mnt/ proc/ run/ srv/ tmp/ var/
but the manual specify
-d, --directory
list directories themselves, not their contents
What's the reason -d
perform this way?
bash
New contributor
add a comment |Â
up vote
0
down vote
favorite
up vote
0
down vote
favorite
I'd like to only the directory
$ ls -d
.
#get . on macos
and the same on centos
[root@iz2ze9wve43n2nyuvmsfx5z ~]# ls -d .
.
I find the solution:
[root@iz2ze9wve43n2nyuvmsfx5z /]# ls -d */
bin/ dev/ home/ lib64/ media/ opt/ root/ sbin/ sys/ usr/
boot/ etc/ lib/ lost+found/ mnt/ proc/ run/ srv/ tmp/ var/
but the manual specify
-d, --directory
list directories themselves, not their contents
What's the reason -d
perform this way?
bash
New contributor
I'd like to only the directory
$ ls -d
.
#get . on macos
and the same on centos
[root@iz2ze9wve43n2nyuvmsfx5z ~]# ls -d .
.
I find the solution:
[root@iz2ze9wve43n2nyuvmsfx5z /]# ls -d */
bin/ dev/ home/ lib64/ media/ opt/ root/ sbin/ sys/ usr/
boot/ etc/ lib/ lost+found/ mnt/ proc/ run/ srv/ tmp/ var/
but the manual specify
-d, --directory
list directories themselves, not their contents
What's the reason -d
perform this way?
bash
bash
New contributor
New contributor
New contributor
asked 4 mins ago
Sawajiri
1726
1726
New contributor
New contributor
add a comment |Â
add a comment |Â
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
Sawajiri is a new contributor. Be nice, and check out our Code of Conduct.
Â
draft saved
draft discarded
Sawajiri is a new contributor. Be nice, and check out our Code of Conduct.
Sawajiri is a new contributor. Be nice, and check out our Code of Conduct.
Sawajiri is a new contributor. Be nice, and check out our Code of Conduct.
Â
draft saved
draft discarded
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
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f479031%2fwhy-ls-d-only-demonstrate%23new-answer', 'question_page');
);
Post as a guest
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
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
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