Gentoo Archives: gentoo-user

From: Joerg Schilling <Joerg.Schilling@××××××××××××××××.de>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] [OT] -print0 but with 'locate'
Date: Sat, 03 Sep 2016 10:23:21
Message-Id: 57caa488.rc/rzX5u0D5JitH7%Joerg.Schilling@fokus.fraunhofer.de
In Reply to: [gentoo-user] [OT] -print0 but with 'locate' by Meino.Cramer@gmx.de
1 <Meino.Cramer@×××.de> wrote:
2
3 > Hi,
4 >
5 > I want to 'locate' a bunch of files and feed the output into
6 > '| xargs md5sum'.
7 > Unfortunately some of them are infected with the "file name"-virus
8 > (space in the filename).
9 > With find there is the -print0 option which corresponds to '-0' of
10 > the xargs options. As of my knowledge, locate does not have such
11 > a thing.
12
13 This is one of the reasons, why POSIX did not include -print0, as it would need
14 to add new related options to an unknown amount of other programs.
15
16 Another reason of curse is that "find . -exec cmd {} +" exists longer than GNU
17 find and it's -print0. Execplus was added on 1989 by David Korn.
18
19 Jörg
20
21 --
22 EMail:joerg@××××××.net (home) Jörg Schilling D-13353 Berlin
23 joerg.schilling@××××××××××××××××.de (work) Blog: http://schily.blogspot.com/
24 URL: http://cdrecord.org/private/ http://sourceforge.net/projects/schilytools/files/'

Replies

Subject Author
Re: [gentoo-user] [OT] -print0 but with 'locate' Meino.Cramer@×××.de