Will help you to find word in directory
Code
|
Request Feature
Table of Contents
Utility that searches for a specific word in all files in directory, or you can just put a path to file - this also works.
Clone the repository:
git clone https://github.com/Ptyg/FileWordFinder_rust.git
And run the following command in the project directory:
cargo build --release
# or debug, if you want to
cargo build --debug
This will build the program and create an executable in the target/release
( target/debug
) directory.
To find word in directory run the following command:
finder {word} {directory}
Replace {word}
with the word you want to search for and {directory}
with the directory you want to search in.
For example, to search for the word "hello"
in the directory /home/user/Documents
, run the following command:
finder hello /home/user/Documents
To find word in specific file run the same command but write full path to file:
finder hello /home/user/Documents/myFile.txt
Finder
also supports the following optional arguments:
-h
or--help
: Prints help information-V
or--version
: Prints version information-t
or--filetype
: Specifies the type of file in which to search for a word-p
or--path
: Sets path to file or directory-w
or--word
: Sets word to find
If you have a suggestion that would make this better, please fork the repo and create a pull request.
- Fork the Project
- Create your Feature Branch (
git checkout -b { branch_name }
) - Commit your Changes (
git commit -m 'Add an amazing feature'
) - Push to the Branch (
git push origin { branch_name }
) - Open a Pull Request
Distributed under the MIT License. See LICENSE
for more information.