Ack/Ag/Pt just list files?

5

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

Posted 2017-09-25T15:34:17.657

Reputation: 173

Answers

9

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

e.g.

$ ag -l foo
file.js
file2.py

tom-james-watson

Posted 2017-09-25T15:34:17.657

Reputation: 106

1This 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 – 2018-05-30T17:53:36.203

Ah, in that case you might want to look into the tree command. – tom-james-watson – 2019-10-21T11:47:08.713