9

I want to list every file, including hidden files, in the current directory. I don't want to include the parent (..) and current (.) directory.

I found this:

how to glob every hidden file except current and parent directory

At the end, someone states ls -A is the way to go, but it's downvoted. However, it seems to work. What's wrong with ls -A?

1 Answers1

21

ls -A is the correct answer to your question, but not to the question you linked to (that question was about listing only hidden files and directories).

angus
  • 12,321
  • 3
  • 45
  • 40
  • 1
    More precise is that question is about globbing, hidden files and directories with the exclusion of . and .., not about listing. Listing only those globbed entries is not the same as doing ls -A, but this should be close enough for the OP. – Anthon Oct 25 '14 at 13:03