1# sift
2
3A fast and powerful open source alternative to grep.
4
5
6## Features
7
8sift has a slightly different focus than most other grep alternatives. Code search, log search / digital forensics and data processing are the main use cases, but the primary goal is to provide safe defaults and to make it easily configurable for a specific use case. Among the features are:
9
10* Stable releases, cross platform support
11* Safe defaults: sift searches everywhere if not configured otherwise
12* Complete & working .gitignore support
13* High [performance](https://sift-tool.org/performance) for many uses cases
14* Support for adding custom file types to narrow down searches
15* Multiline support
16* Support for big files: >50GB, >5,000,000,000 lines and >5,000,000,000 matches successfully tested
17
18Sift allows easy customization.
19Example: Configure sift to
20* Ignore case
21* Show line numbers
22* Skip binary files
23* Respect .gitignore files:
24
25```sift -i -n --binary-skip --git --write-config```
26
27The configuration can be overridden for specific directories.
28
29sift understands **conditions** to process complex formats or support code audits.
30
31Example: Search for ```.php``` files containing a call to mysql_query, that is preceded by ```$_GET``` or ```$_POST``` (accessing external input), but the preceding 5 lines do not contain a call to an escape function:
32
33```sift -x php mysql_query --preceded-within "5:_(GET|POST)" --not-preceded-within "5:escape"```
34
35
36Please go to [sift-tool.org](https://sift-tool.org) for more information.
37
38
39## Installation
40
41### Download Binaries
42You can download binaries for the current version at https://sift-tool.org/download.
43
44sift is available for Linux, Windows, OS X and *BSD.
45
46
47### Install from Package Repositories
48
49#### Arch Linux
50Download and install the binary from http://sift-tool.org/download:
51
52```sh
53$ yaourt -S sift-bin
54```
55
56Or build and install sift from source at https://github.com/svent/sift:
57
58```sh
59$ yaourt -S sift
60```
61
62#### OS X
63
64Using [Homebrew](http://brew.sh/):
65
66```sh
67$ brew install sift
68```
69
70### Install with Working Go Environment
71
72If you have a working go environment, you can install sift using "go get":
73
74```go get github.com/svent/sift```
75
76
77## Contributing
78
79### Feature Requests
80If there is a feature or option you would like to see in sift,
81please open an issue and describe what you are missing.
82Where possible, please include an example (input file,
83expected output etc.) to better convey your idea.
84
85### Bugs / Unexpected Behavior
86If you found a bug, please check the open issues and the
87[limitations and restrictions](https://sift-tool.org/docs)
88described in the documentation.
89If you cannot find any documentation about it, please open a new issue,
90name the sift version you used and describe the steps to reproduce the problem.
91
92### Pull requests
93Please do not send pull requests and open an issue instead as
94accepting substantial contributions cannot be done correctly without some
95[legal](http://producingoss.com/en/copyright-assignment.html)
96[hassle](https://en.wikipedia.org/wiki/Contributor_License_Agreement).
97Moreover, this allows me to consider already planned features while implementing
98smaller changes.
99
100
101## License
102
103Copyright (C) 2014-2016 Sven Taute
104
105This program is free software: you can redistribute it and/or modify
106it under the terms of the GNU General Public License as published by
107the Free Software Foundation, version 3 of the License.
108
109This program is distributed in the hope that it will be useful,
110but WITHOUT ANY WARRANTY; without even the implied warranty of
111MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
112GNU General Public License for more details.
113
114You should have received a copy of the GNU General Public License
115along with this program.  If not, see <http://www.gnu.org/licenses/>.
116
117