Sample Header Ad - 728x90

Find only the first few matched files using find

32 votes
4 answers
29976 views
Say there are hundreds of *.txt files in a directory. I only want to find the first three *.txt files and then exit the searching process. How can I achieve this using the find utility? I had a quick look through its man pages but saw no option for this.
Asked by mitnk (581 rep)
Mar 19, 2013, 08:19 AM
Last activity: Jun 5, 2025, 12:25 PM