What means ls -d? [duplicate]
This question already has an answer here:
Why `ls -d` only demonstrate `.`?
2 answers
When I use the -d
, I only have the .
that is displayed on the standard output. However, I also have other files in the current directory.
ls
marked as duplicate by Jeff Schaller, Jesse_b, ilkkachu, roaima, Stephen Harris Feb 20 at 23:26
This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.
add a comment |
This question already has an answer here:
Why `ls -d` only demonstrate `.`?
2 answers
When I use the -d
, I only have the .
that is displayed on the standard output. However, I also have other files in the current directory.
ls
marked as duplicate by Jeff Schaller, Jesse_b, ilkkachu, roaima, Stephen Harris Feb 20 at 23:26
This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.
add a comment |
This question already has an answer here:
Why `ls -d` only demonstrate `.`?
2 answers
When I use the -d
, I only have the .
that is displayed on the standard output. However, I also have other files in the current directory.
ls
This question already has an answer here:
Why `ls -d` only demonstrate `.`?
2 answers
When I use the -d
, I only have the .
that is displayed on the standard output. However, I also have other files in the current directory.
This question already has an answer here:
Why `ls -d` only demonstrate `.`?
2 answers
ls
ls
edited Feb 20 at 21:09
Jesse_b
13.3k23369
13.3k23369
asked Feb 20 at 21:07
7hsk7hsk
1
1
marked as duplicate by Jeff Schaller, Jesse_b, ilkkachu, roaima, Stephen Harris Feb 20 at 23:26
This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.
marked as duplicate by Jeff Schaller, Jesse_b, ilkkachu, roaima, Stephen Harris Feb 20 at 23:26
This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.
add a comment |
add a comment |
2 Answers
2
active
oldest
votes
The -d
option says:
-d, --directory
list directories themselves, not their contents
This is showing you .
because that is your current directory. This could be used in combination with -l
if you simply wanted to see the permissions/ownership of the directory, among other things.
add a comment |
The -d
switch lists the directory itself and not the contents. In your case, that means the current directory. If you run ls -ld
, it will show the permissions, ownership, last changed time, etc of the current directory.
If you run ls -d another_directory
then it will show the same for whatever directory you specify.
add a comment |
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
The -d
option says:
-d, --directory
list directories themselves, not their contents
This is showing you .
because that is your current directory. This could be used in combination with -l
if you simply wanted to see the permissions/ownership of the directory, among other things.
add a comment |
The -d
option says:
-d, --directory
list directories themselves, not their contents
This is showing you .
because that is your current directory. This could be used in combination with -l
if you simply wanted to see the permissions/ownership of the directory, among other things.
add a comment |
The -d
option says:
-d, --directory
list directories themselves, not their contents
This is showing you .
because that is your current directory. This could be used in combination with -l
if you simply wanted to see the permissions/ownership of the directory, among other things.
The -d
option says:
-d, --directory
list directories themselves, not their contents
This is showing you .
because that is your current directory. This could be used in combination with -l
if you simply wanted to see the permissions/ownership of the directory, among other things.
answered Feb 20 at 21:11
Jesse_bJesse_b
13.3k23369
13.3k23369
add a comment |
add a comment |
The -d
switch lists the directory itself and not the contents. In your case, that means the current directory. If you run ls -ld
, it will show the permissions, ownership, last changed time, etc of the current directory.
If you run ls -d another_directory
then it will show the same for whatever directory you specify.
add a comment |
The -d
switch lists the directory itself and not the contents. In your case, that means the current directory. If you run ls -ld
, it will show the permissions, ownership, last changed time, etc of the current directory.
If you run ls -d another_directory
then it will show the same for whatever directory you specify.
add a comment |
The -d
switch lists the directory itself and not the contents. In your case, that means the current directory. If you run ls -ld
, it will show the permissions, ownership, last changed time, etc of the current directory.
If you run ls -d another_directory
then it will show the same for whatever directory you specify.
The -d
switch lists the directory itself and not the contents. In your case, that means the current directory. If you run ls -ld
, it will show the permissions, ownership, last changed time, etc of the current directory.
If you run ls -d another_directory
then it will show the same for whatever directory you specify.
answered Feb 20 at 21:13
Nasir RileyNasir Riley
2,812249
2,812249
add a comment |
add a comment |