Is there a way to make the find command to stop right after finding the first match?
|
|
|
With GNU find, you can use the
If all you do is printing the name, and assuming the filenames don't contain newline characters, you could do:
That will not stop If you're doing more than printing the paths of the found files, you could try this approach:
(replace That has the side effect of Actually, using the SIGPIPE signal instead of SIGTERM ( |
||||
|
|
|
For entertainment purposes, here's a lazy find generator in Bash. This example generates a ring over the files in the current directory. Read however many you want then
|
||||
|
|

