To look for a specific file, run the following command from the root (/). The command contains the exact name for the file you are searching for.
find . -name gk2899.txt
Output
./test/gk2899.txt
./sales/gk2899.txt
Please note that the results include the path. This is important if you don’t know the directory where the file is located, or when it is in more than one place.
You can also search for the file in another directory while still in the current location. In this case, you need to provide the path for the directory where you want to search.
find ./test -name gk2899.txt
Comments