Using ACK to list directories

Posted by KPthunder on Super User See other posts from Super User or by KPthunder
Published on 2012-10-18T16:42:03Z Indexed on 2012/10/18 17:06 UTC
Read the original article Hit count: 268

Filed under:
|
|

I have a directory listing as follows (given by ls -la):

total 8
drwxr-xr-x   6 <user>  <group>  204 Oct 18 12:13 .
drwxr-xr-x   7 <user>  <group>  238 Oct 18 11:29 ..
drwxr-xr-x  14 <user>  <group>  476 Oct 18 12:31 .git
-rw-r--r--   1 <user>  <group>  601 Oct 18 12:03 index.html
drwxr-xr-x   2 <user>  <group>   68 Oct 18 12:13 test
drwxr-xr-x   2 <user>  <group>   68 Oct 18 12:13 test2

Running ack . -f prints out the files in the directory:

index.html

How can I get ack to print out the directories in the directory? I want to ignore the .git directory (which I understand is default behavior for ack). On that note, how can I ignore certain directories?

I am using ack 1.9.6 on Mac OSX 10.8.2.

© Super User or respective owner

Related posts about osx

Related posts about unix