grepfiles

module
v1.0.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 31, 2022 License: MIT

README

grepfiles🔍

InstallationUsageTodo

Grep tool for some file formats like:

  • Image (.png, .jpg, etc.)
  • PDF
  • Microsoft Word, Excel, PowerPoint
  • SQLite

and other text formats.

Installation

# install dependencies on macOS
➜  ~ brew install wv
➜  ~ brew install tesseract
➜  ~ wget https://github.com/tesseract-ocr/tessdata/raw/main/jpn.traineddata -O /usr/local/share/tessdata/jpn.traineddata # add japanese data

# install dependencies on Kali Linux
$ sudo apt install libpng-dev libjpeg-dev libtiff-dev zlib1g-dev gcc g++ autoconf automake libtool checkinstall
$ cd /opt
$ wget https://github.com/DanBloomberg/leptonica/releases/download/1.82.0/leptonica-1.82.0.tar.gz # download the latest release from GitHub (https://github.com/DanBloomberg/leptonica/)
$ tar -zxvf leptonica-1.82.0.tar.gz
$ cd leptonica-1.82.0/
$ ./configure
$ make
$ sudo checkinstall
$ sudo ldconfig
$ sudo apt install libtesseract-dev tesseract-ocr
$ wget https://github.com/tesseract-ocr/tessdata/raw/main/jpn.traineddata -O /usr/local/share/tessdata/jpn.traineddata # add japanese data

# install grepfiles
➜  ~ go install -v github.com/kawakatz/grepfiles/cmd/grepfiles@latest

Usage

➜  ~ grepfiles <path> <keyword> 2>/dev/null
➜  ~ grepfiles . 'secret' 2>/dev/null

<path> can be a path of a file or directory.
If a directory path is specified, grepfiles will recursively grep all files in the directory.

grepfiles is case insensitive.
If you need a case sensitive grep, you can grep as below:

➜  ~ grepfiles <dir> <keyword> | grep <keyword>

📋 Todo

  • Optimize performance

Directories

Path Synopsis
cmd
pkg

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL