Sujet : Re: Files tree
De : ldo (at) *nospam* nz.invalid (Lawrence D'Oliveiro)
Groupes : comp.os.linux.miscDate : 13. Apr 2024, 01:23:31
Autres entêtes
Organisation : A noiseless patient Spider
Message-ID : <uvcja3$2kbfj$8@dont-email.me>
References : 1 2
User-Agent : Pan/0.155 (Kherson; fc5a80b8)
On Fri, 12 Apr 2024 15:29:02 -0000 (UTC), Borax Man wrote:
One thing, find has a "printf" option, where you can format the output.
you can remove the need for "tr" by using this instead of "-print0".
-print0 can handle arbitrary filenames. Even the find(1) man page, in the
section “UNUSUAL FILENAMES”, says
If you are able to decide what format to use for the output of
find then it is normally better to use `\0' as a terminator than
to use newline, as file names can contain white space and newline
characters.
And that is what -print0 does.