I am trying to use find to locate a single directory, and I would like it to stop as soon as it finds something, is this possible?
Currently I am using the command
find /directory/to/search/ -maxdepth 4 -name *search_text* -type d -prune Which cuts the run time down a decent amount but it still continues for a while after it finds what I am looking for. Since this is being run in a script I can't simply Ctrl+c to stop it. Any suggestions?