3
ls -la .

will show this in it:

insgesamt 1312
drwxrwxr-x  6 ruben rubo77   4096 Feb 23 06:20 .
drwxrwxr-x 23 ruben rubo77   4096 Feb  6 21:48 ..
...

But it will show the whole content of the folder too.

I could narrow the output with head and tail:

ls -la .|head -n 2|tail -n 1

But isn't there an option in ls to show only the current directory you are in?

0
9

No argument to ls necessary, the -d option alone together with -l will do

ls -ld
1
  • 1
    @JMCF125 I closed because after I answered it became clear that the post was a duplicate closed. You don't seem to understand the Stack Exchange system.
    – Timo
    Feb 24 '14 at 7:57
2

I found it in the man page:

-d, --directory
list directory entries instead of contents, and do not dereference symbolic links

so it is:

ls -lad .
1
  • If you want an option to select the current directory, then you don't have to specify it as an argument. ls -ld will do. The -a is unnecessary as well.
    – Timo
    Feb 23 '14 at 7:49

Not the answer you're looking for? Browse other questions tagged or ask your own question.