This tool is designed to simplify the process of searching directories for specific files or file types on Unix/Linux systems. Additionally, it offers the functionality to execute executable files found during the search.
./file_search_tool [OPTIONS]Options:
- -name PATTERN: Search for files with a specific name pattern.
- -type TYPE: Specify the type of file to search for (f: regular file, d: directory).
- -path STRING: Set the path where the search should be performed (default is the current directory).
- -exec: Execute the found executable files.
- -h, --help: Display help and exit.
- Search for all text files in the current directory:
./file_search_tool -name "*.txt"- Search for executable files and execute them:
./file_search_tool -type f -exec- The tool follows symbolic links by default. Use the
-no-follow-linksoption to disable following symbolic links. - If no options are provided, the tool will search for all files in the current directory.