Copy .deb files from separate dir to /var/cache/apt/archives

Florian Diesch diesch at spamfence.net
Sun Oct 29 01:30:23 UTC 2006


Thilo Six <T.Six at gmx.de> wrote:

> OOzy Pal wrote the following on 28.10.2006 20:01:
>> How can I copy a bunch of .deb files from multiple directories to
>> /var/cache/apt/archives in one shot to avoid downloading again.
>
> e.g. ones i copied the debs from the alternate cd to
> /var/cache/apt/archives. I used:
>
> sudo cp -v /media/cdrom/pool/*/*/*/*deb /var/cache/apt/archives/

if you don't want to care about the path depth:
 find /media/cdrom/pool -name \*.deb | sudo xargs -i cp -v {} /var/cache/apt/archives/

Using zsh it's just
 sudo cp -v /media/cdrom/pool/**/*.deb /var/cache/apt/archives/


   Florian
-- 
<http://www.florian-diesch.de/>




More information about the ubuntu-users mailing list