finx
is an advanced find utility written in Go.
- Type Filtering
- Max Depth
- more coming soon...
You can install finx
easily on Linux by running the following command:
curl -s https://raw.githubusercontent.com/shashankx86/finx/refs/heads/main/install.sh | bash
This script will download, and install finx
on your system.
git clone https://github.com/shashankx86/finx.git
Navigate to the project folder and build the executable:
cd finx
go build -o finx ./cmd
After building the binary, you can run it using:
./finx <directory_path> <pattern>
./finx <directory_path> <pattern> [flags]
<directory_path>
: The path where you want to start your search. (e.g.,./
,/path/to/search
).<pattern>
: The file pattern to search for. Use wildcard characters like*
or?
(e.g.,*.go
,test*
).
-
-type
: Filter by file type.f
- Search for files only.d
- Search for directories only.
-
-maxdepth
: Set the maximum recursion depth.- Example:
-maxdepth 2
limits the search to two levels deep.
- Example:
-
-v
: Enable verbose output to show the progress of the search.
# Search for all Go files in a directory
./finx /path/to/search "*.go"
# Search for all text files in the current directory, limit to 2 levels of depth
./finx /path/to/search "*.txt" -maxdepth 2
# Search for all directories named "test" in a specific path, verbose output enabled
./finx /path/to/search "test*" -type d -v
# Search for files only, no directories, verbose output
./finx /path/to/search "*.md" -type f -v
-
Search for all
.go
files in the current directory:./finx . "*.go"
-
Search for
.txt
files, limiting the depth to 3 levels:./finx /path/to/directory "*.txt" -maxdepth 3
-
Search for directories only (
-type d
):./finx /path/to/search "test*" -type d
-
Enable verbose output to see which files are being processed:
./finx /path/to/search "*.log" -v
-
-type f
: Search only for files, ignoring directories.Example:
./finx /path/to/search "*.txt" -type f
-
-type d
: Search only for directories, ignoring files.Example:
./finx /path/to/search "docs*" -type d
-
-maxdepth <n>
: Limits the search depth ton
levels.Example:
./finx /path/to/search "*.go" -maxdepth 2
-
-v
: Verbose output that displays the files being checked during the search.Example:
./finx /path/to/search "*.log" -v
This project is licensed under the GPL-2.0 License. See the LICENSE file for more details.
Feel free to submit issues or pull requests if you'd like to contribute. Contributions are welcome!