misc/125057: xargs needs an option to use only newlines to
delimit args
Kris Kennaway
kris at FreeBSD.org
Sat Jun 28 09:40:07 UTC 2008
The following reply was made to PR misc/125057; it has been noted by GNATS.
From: Kris Kennaway <kris at FreeBSD.org>
To: Dave Yost <Dave at Yost.com>
Cc: freebsd-gnats-submit at FreeBSD.org
Subject: Re: misc/125057: xargs needs an option to use only newlines to delimit
args
Date: Sat, 28 Jun 2008 11:39:02 +0200
Dave Yost wrote:
> It is very common nowadays to have lots of filenames with spaces in them.
> The current solution to this is cumbersome:
>
> find . - type f | tr '\012' '\000' | xargs -0 ls -ltr
That is not the correct solution :-)
find . -type f -print0 | xargs -0 ls -ltr
The xargs manpage even mentions that -0 is the counterpart of find -print0.
Kris
More information about the freebsd-bugs
mailing list