User:Gregor/FindThings: Difference between revisions

From KDE UserBase Wiki
(ack)
Line 16: Line 16:


== Find files by content and filename ==
== Find files by content and filename ==
=== grep ===
Normally, one would use the standard tool grep, but ack is better in some ways.
=== ack ===


Case-insensitive example:
Case-insensitive example:
  ack -i kmoretools
  ack -i kmoretools


(Install with sudo zypper install ack)
Install: sudo zypper install ack
Website: http://beyondgrep.com/
 
=== ag ===
 
Case-insensitive example:
ack -i kmoretools


Normally, one would use the standard tool grep, but ack is better in some ways: http://beyondgrep.com/
Install: sudo zypper install the_silver_searcher
Website: https://github.com/ggreer/the_silver_searcher

Revision as of 19:40, 11 October 2015

Find Things

How to find things under Linux.

Find files by filename

Case-insensitive example:

find . -type f -iname "*hello*"

Finds "Hello, hello, Thello, Thelloman, HELLO, hELLO, ..."

Case-sensitive example:

find . -type f -name "*Hello*"

Finds "Hello, THello, THelloman, ..."

(http://stackoverflow.com/questions/13131048/linux-find-file-names-with-given-string)

Find files by content and filename

grep

Normally, one would use the standard tool grep, but ack is better in some ways.

ack

Case-insensitive example:

ack -i kmoretools

Install: sudo zypper install ack Website: http://beyondgrep.com/

ag

Case-insensitive example:

ack -i kmoretools

Install: sudo zypper install the_silver_searcher Website: https://github.com/ggreer/the_silver_searcher