Follow-up Comment #1, bug #54730 (project findutils): I'm not sure what you want to achieve with the perl example, because there is a syntax error in it - probably due to missing quoting.
Here's another example: For each file in '/dev', run stat(1) to print its file type and name, and stop at the first block device found: $ find /dev \ -exec stat -c "%F: %n" '{}' \; \ \( -exec test ! -b '{}' \; -o -quit \) directory: /dev character special file: /dev/vcsa10 character special file: /dev/vcs10 fifo: /dev/xconsole character special file: /dev/vcs2 block special file: /dev/loop7 This example is more complex than the one in the man page. Maybe we should expand on the man page by saying that find stops at the first existing file: # Prepare files 3 4 5, ensuring that 1 and 2 do not exist. $ rm -f 1 2 ; touch 3 4 5 # Run find to print the file name of and stop at the first existing one. $ find 1 2 3 4 5 -print -quit find: '1': No such file or directory find: '2': No such file or directory 3 Do you mean something like that? Or what real-life example would you prefer? _______________________________________________________ Reply to this item at: <https://savannah.gnu.org/bugs/?54730> _______________________________________________ Message sent via Savannah https://savannah.gnu.org/