URL: <https://savannah.gnu.org/bugs/?56142>
Summary: Incoherence between info and man about the effect of -print on the default action Project: findutils Submitted by: frasan Submitted on: Tue 16 Apr 2019 03:24:02 PM UTC Category: documentation Severity: 3 - Normal Item Group: None Status: None Privacy: Public Assigned to: None Originator Name: Originator Email: Open/Closed: Open Discussion Lock: Any Release: 4.6.0 Fixed Release: None _______________________________________________________ Details: $ find --version find (GNU findutils) 4.6.0 Copyright (C) 2015 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>. This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Written by Eric B. Decker, James Youngman, and Kevin Dalley. Features enabled: D_TYPE O_NOFOLLOW(enabled) LEAF_OPTIMISATION FTS(FTS_CWDFD) CBO(level=2) Section 1.3 "'find' Expressions" of the Texinfo documentation (doc/find.texi <https://git.savannah.gnu.org/cgit/findutils.git/tree/doc/find.texi?h=v4.6.0>) states: If the expression contains no actions other than '-prune', '-print' is performed on all files for which the entire expression is true The manual page (find/find.1 <https://git.savannah.gnu.org/cgit/findutils.git/tree/find/find.1?h=v4.6.0>), section "EXPRESSION", states: If the whole expression contains no actions other than -prune or -print, -print is performed on all files for which the whole expression is true The latter seems to imply that a -print somewhere in the expression would not suppress the default action. It appears to be inaccurate: $ mkdir test && cd $_ $ mkdir a $ touch f1 a/f2 $ find . -path "*/a/*" -prune -o -type f -print ./f1 $ find . -path "*/a/*" -prune -o -type f ./a/f2 ./f1 Apparently, find/find.1 should be aligned to doc/find.texi, i.e. "no actions other than -prune or -print" should be "no actions other than -prune". _______________________________________________________ Reply to this item at: <https://savannah.gnu.org/bugs/?56142> _______________________________________________ Message sent via Savannah https://savannah.gnu.org/