Re: findutils-4.8.0-2.fc34.x86_64

Kamil Dudka <[email protected]>
Newsgroups gmane.comp.gnu.findutils.bugs
Message-ID <5644362.MhkbZ0Pkbq@nbkamil>
On Tuesday, August 31, 2021 11:26:15 AM CEST Ricky Tigg wrote:
> Tested on Fedora; findutils-4.8.0-2.fc34.x86_64
> 
> Hello.As noticeable in output resulting from  'find <source_path> -name
> "<target>"'' , paths are duplicated.
> 
> $ find /usr/share/icons/ -name "battery*" | head -1
> /usr/share/icons/Adwaita/16x16/devices/battery-symbolic.symbolic.png
> 
> Wouldn't be be that state worth an addition of an option covering the
> following rule: *Do not print source path*. Model of output: that would
> result:
> 
> $ find /usr/share/icons/ -<*Do_not_print_source_path*> -name "battery*" |
> head -1
> Adwaita/16x16/devices/battery-symbolic.symbolic.png
> 
> Regards.

There is already the %P directive of the -printf predicate that does it:

$ find /usr/share/icons/ -name "battery*" -printf '%P\n'

Kamil
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.