Date: Mon, 30 Jun 2014 12:57:09 -1000 From: parv <parv@pair.com> To: Gary Kline <kline@thought.org> Cc: Polytropon <freebsd@edvax.de>, FreeBSD Mailing List <freebsd-questions@freebsd.org> Subject: Re: long string using find and "-exec ls -ls" to find part-of filename Message-ID: <20140630225709.GA1993@holstein.holy.cow> In-Reply-To: <20140701003013.f068eb05.freebsd@edvax.de> References: <20140630045605.GA11147@ethic.thought.org> <53B0EFF2.80205@calorieking.com> <CA%2Bg%2BBvg1=o71ObOpbh4ry-=unj2HOjjmcQHX1DOeAfwyhLu=QQ@mail.gmail.com> <20140630053004.GB16901@ethic.thought.org> <CA%2Bg%2BBvh%2BDk0iYCjbGKVt59-nfDoCFQ6qmArrJu7ueaT7VzDi1g@mail.gmail.com> <20140630064044.GA25085@ethic.thought.org> <20140630230316.44ec3257.freebsd@edvax.de> <20140630214506.GA1606@holstein.holy.cow> <20140630215534.GA28552@ethic.thought.org> <20140701003013.f068eb05.freebsd@edvax.de>
next in thread | previous in thread | raw e-mail | index | archive | help
in message <20140701003013.f068eb05.freebsd@edvax.de>,
wrote Polytropon thusly...
>
Sorry Polytropon, for I lost Gary's mail.
> On Mon, 30 Jun 2014 14:55:34 -0700, Gary Kline wrote:
> > how about whitespace? ls -lsi appears as two cmds, so would
> > it work as you have with backtics?
> >
> > find ... | xargs -n 1 `ls -lsi`
Do see find(1) manual page ...
-print0
This primary always evaluates to true. It prints
the pathname of the current file to standard
output, followed by an ASCII NUL character
(character code 0).
... and xargs(1) one ...
-0 Change xargs to expect NUL (``\0'') characters as
separators, instead of spaces and newlines. This is
expected to be used in concert with the -print0
function in find(1).
... to form ...
find ... -print0 | xargs -0 -n 1 ...
- parv
--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20140630225709.GA1993>
