This is a simple custom implementation of a find
-like command for UNIX-like operating systems, written in C.
- Search for files by name.
- Support for wildcard patterns (
.
and*
). - Recursive search through directories.
To compile and install the find
command, follow these steps:
- Clone the repository:
git clone https://github.com/without-eyes/findCommand.git
cd findCommand
- Compile the program:
make
The basic syntax for using the find command is:
./find [file1] [file2] ... [fileN]
- file1, file2, ..., fileN: The specific file names or patterns to search for. Wildcards (. and *) can be used to match multiple files.
Search for all files named "test.txt":
./find test.txt
Search for all files with names starting with "test":
/find test*
Search for all types of files with name "test":
/find test.*
The program uses standard C libraries such as dirent.h for directory traversal. The code is designed to be simple and demonstrate basic file search functionality.
This project is licensed under the MIT License.