12

For a Unix/Unix-like OS...

So, I know I can just use find . to list all of the files recursively from the current folder. This includes files I am not interested in.

Using Ack, Ag (silver searcher), or Pt (platinum searcher), is there a way to do the same thing?

I do not want to search inside the files themselves, I just want to list all of the files in my project, without listing the files that these tools ignore for me.

aikeru
  • 243
  • 2
  • 9

1 Answers1

20

With both ag and ack you just provide the -l flag.

e.g.

$ ag -l foo
file.js
file2.py
  • 1
    This seems to search for files containing "foo". I don't want to search for anything inside the files. Does that make sense? EDIT: oh I see with ag it does seem to list if you don't put the "foo", thanks! – aikeru May 30 '18 at 17:53
  • Ah, in that case you might want to look into the `tree` command. – tom-james-watson Oct 21 '19 at 11:47