Reputation: 467
I am trying to search text in a directory and it turned out that the following syntaxes do not return any result
ack -i "0xabcdef" ./
ack -i "0xabcdef"
ack -i "0xabcdef" .
while the following command works
ack -i "0xabcdef" *
Can someone explain why that is the case? What is the significance of * . I also noticed that the directory has symbolic links
Upvotes: 0
Views: 130
Reputation: 93636
You should not have to specify a directory to ack. By default it delves into the current directory.
I also noticed that the directory has symbolic links
Then an excellent thing to do would be to look at the manual (either man ack
or ack --man
) and search for "link". The first thing you'll find is this option:
--[no]follow
Follow or don't follow symlinks, other than whatever starting files
or directories were specified on the command line.
This is off by default.
This means if you want ack to follow symlinks, you need to specify the --follow
option.
Upvotes: 1