Posts Tagged With: search

Search Debian Package

Tagged with: , , , , , ,

Show all deb packages with the name “httpd”


dpkg -l | grep httpd
2 Comments »

Optimized Grep Searching

Tagged with: , , , , , , ,

Grep that searches recursively, ignores binary files, and doesn’t look inside Subversion hidden folders.


grep -Ir --exclude="*\.svn*" "pattern" *
No Comments »

Find New Files

Tagged with: , , , , , ,

Search files created or changed within 10 days


find /usr/bin -type f -mtime -10
No Comments »

Grep using Sed

Tagged with: , , , ,

View only lines that contain the word “string”


sed -n '/string/p'
No Comments »

Seach for a String in a Folder using grep

Tagged with: , , , , ,

Search string “test_text” at directory ‘/var/log’ and below


grep test_text -R /var/log/*
No Comments »

Recursive Grep

Tagged with: , , , ,

Recursively check a folder to find the given text using grep


grep -R "text" *
No Comments »

Search Text in a Folder using grep

Tagged with: , , ,

Search for a specific text in a folder using grep


grep "fetchFeedPacksCustomize()" *.js

[tags]grep,search,text,folder[/tags]

No Comments »

Directory Listing Only Search

Tagged with: , , , , , ,

The search that limits the results to just directory listings…

intitle:”index.of” inanchor:”Last Modified” inanchor:”Description” inanchor:”Parent Directory” -filetype:php -filetype:asp -filetype:htm -filetype:html -inurl:”index.of” search.string

No Comments »

Searching text in a directory using find and grep

Tagged with: , , , , , , ,

Use find and grep to search for a specific text in a directory. In this example, we search for files which uses the PHP short tag – <?


find -name '*.php' -exec grep '<?[^p\=]' {} \;
No Comments »

Install Recoll

Tagged with: , , , , , , , ,

Recoll is a personal full text search tool for Unix/Linux. It is based on the very strong Xapian backend, for which it provides an easy to use, feature-rich, easy administration, QT graphical interface.


su -
[Enter Password]
cd /etc/yum.repos.d/
wget http://www.xapian.org/RPM/xapian.repo
yum install xapian-omega xapian-bindings-php xapian-bindings-python xapian-bindings-tcl8

cd ~
wget http://www.lesbonscomptes.com/recoll/recoll-1.8.1.tar.gz
tar -xzf recoll-1.8.1.tar.gz
cd recoll-1.8.1
./configure
make
make install

[tags]recoll,software,install,linux,command,cli,search,application,beagle[/tags]

No Comments »