Script Questions

Chris Sechiatano chris at chris-s.com
Thu Feb 10 16:22:13 PST 2005


This is close to what I was trying before.  Is there a way I can pipe the
output of locate into xargs?  The filesystem is 680 Gigs and I'd like to
only search it once if possible.

This doesn't work:

# slocate -i -d /tmp/04vfile001_db *.wmv | xargs -0 ls -l

Thanks

On Fri, Feb 11, 2005 at 01:33:11AM +0200, Giorgos Keramidas <keramida at ceid.upatras.gr> wrote:
> 
> Use -print0 (that's a zero at the end of print), and the -0 option of
> xargs.  Then the whitespace shouldn't matter.
> 
> 	# cd /storage/users
> 	# find . -type d -print0 | xargs -0 du -sk
> 
> That should do it.
> 
> - Giorgos



More information about the freebsd-questions mailing list