Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

5
  • No, it would not be a good start at all. In my example, I wish to have the tax* files listed, whilst your solution would simply list all directories that match the pattern without showing their file content. That's something completely different. Commented Oct 5, 2012 at 7:47
  • 1
    I'm not really sure what you want the output to look like. You said you only want files in the current directory to be listed. Try also ls -ldp *2010 Commented Oct 5, 2012 at 7:51
  • @syntaxerror - I don't understand your question either. You did ask for 'only files in the current directory', which is what this answer does. But your comment appears to want the inverse? All files in all sub-directories? Can you edit your question to be clearer? Commented Oct 5, 2012 at 7:53
  • There is actually nothing much to "edit". So again: I want the tax* files in the current directory to be listed, but the directory "invoices2010" which resides in the same working directory and which also matches the given *2010* wildcard pattern should be skipped in the listing. Commented Oct 5, 2012 at 8:03
  • Not what the author asked, but it is what I needed when Google found this answer for me. +1. Commented Apr 22, 2021 at 8:28