*BSD News Article 86034


Return to BSD News archive

Path: euryale.cc.adfa.oz.au!newshost.carno.net.au!harbinger.cc.monash.edu.au!lucy.swin.edu.au!news.rmit.EDU.AU!news.unimelb.EDU.AU!munnari.OZ.AU!news.ecn.uoknor.edu!news.wildstar.net!newsfeed.direct.ca!portc01.blue.aol.com!newsxfer3.itd.umich.edu!howland.erols.net!news.mathworks.com!fu-berlin.de!irz401!orion.sax.de!uriah.heep!news
From: j@uriah.heep.sax.de (J Wunsch)
Newsgroups: comp.unix.bsd.freebsd.misc
Subject: Re: Daily security check output
Date: 2 Jan 1997 22:27:49 GMT
Organization: Private BSD site, Dresden
Lines: 26
Message-ID: <5ahcp5$aqp@uriah.heep.sax.de>
References: <32CBD890.41C67EA6@visint.co.uk>
Reply-To: joerg_wunsch@uriah.heep.sax.de (Joerg Wunsch)
NNTP-Posting-Host: localhost.heep.sax.de
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 8bit
X-Newsreader: knews 0.9.6
X-Phone: +49-351-2012 669
X-PGP-Fingerprint: DC 47 E6 E4 FF A6 E9 8F  93 21 E0 7D F9 12 D6 4E
Xref: euryale.cc.adfa.oz.au comp.unix.bsd.freebsd.misc:33469

Steve Roome <steve@visint.co.uk> wrote:

> find:
> /usr/home/steve/autosaves/#\!usr\!home\!steve\!gtb\!source\!nlist.c#:
> illegal path

> I beleive that the find in /etc/security isn't working as expected,
> i.e. it's one of the listed bugs for find.

The problem is not find itself, but xargs: it uses spaces as
separators between the various filenames to pass them on to ls(1).

Now that find understands -print0, it should probably turned to use
this.  Also, add the option -0 (minus null) to the call to xargs.

j@uriah 849% touch ~/tmp/foo\ bar\ mumble ~/tmp/foo\ #mumpl\ fritz
j@uriah 850% find ~/tmp -name 'foo*' -print0 | xargs -0 ls -l
-rw-r--r--  1 j  other  0 Jan  2 23:26 /home/joerg/tmp/foo #mumpl fritz
-rw-r--r--  1 j  other  0 Jan  2 23:26 /home/joerg/tmp/foo bar mumble

-- 
cheers, J"org

joerg_wunsch@uriah.heep.sax.de -- http://www.sax.de/~joerg/ -- NIC: JW11-RIPE
Never trust an operating system you don't have sources for. ;-)