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

Re: find question (and xargs)

> Hi all,
> this might be a more unix oriented question but I'll ask it anyway 
> because it is very debian related too:
> I would like to find packages bigger than 459976 bytes and split them
> with dpkg-split, if splitting is succesfull I'll remove the package.
> I have come at the following but it doesn't work (and can't figger 
> out why not from the manpages).
> find / -size +459976c -noleaf -type f -name '*.deb'|\
> xargs -n 1 dpkg-split -s {} && rm {}

How is xargs to know what "{}" stands for? "{}" works in the -exec
part in find, not for xargs.

Probably what you want is:

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

joost witteveen
Use Debian Linux!

Reply to: