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

Re: find question (and xargs)



>>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!)

Using `xargs -i' will substitute for {}.

To get && right, put "quotes" round it.

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

Doesn't work for me, nor did I expect it to.

ttfn/rjk


Reply to: