[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: find question (and xargs)



branderhorst@fgg.eur.nl (Erick Branderhorst)  wrote on 13.05.96 in <9605130759.AA29264@mailgate.eur.nl>:

> find / -size +459976c -noleaf -type f -name '*.deb'|\
> xargs -n 1 dpkg-split -s {} && rm {}
>
> I was thinking that {} would be replaced by the filename but that's
> not the case. Anyone know how to solve this?

It's find that does the replacing. None of the {}s are in the find  
arguments, however. (And rm is not even in the xargs arguments!)

Personally, I'd probably make a script for the split-and-remove, but it  
should also work with a shell function.

Anyway, I'd probably try something like this:

find / -size +459976c -noleaf -type f -name '*.deb' -exec split.sh {} \;

#! /bin/sh
dpkg-split -s "$1" && rm "$1"



MfG Kai


Reply to: