I run debian jessie on Host 64-bit and in virtualbox 32-bit. To spare traffic I try to cp the i386 packages from host to the shared folder, for using them in virualbox.
My Hostname/var/cache/apt/archives$ ls -al /var/cache/apt/archives/ |
grep 'i386' |
awk '{print $9}'
alsa-oss_1.0.28-1_i386.deb
gcc-4.9-base_4.9.2-10_i386.deb
i965-va-driver_1.4.1-2_i386.deb
libaacplus2_2.0.2-dmo2_i386.deb
libaio1_0.3.110-1_i386.deb
libasound2_1.0.28-1_i386.deb
libasound2-dev_1.0.28-1_i386.deb
libasound2-plugins_1.0.28-1+b1_i386.deb
Shows me the packages I'm looking for. but them I try to cp them after xargs
My Hostname/var/cache/apt/archives$ ls -al /var/cache/apt/archives/ |
grep 'i386' |
awk '{print $9}' |
LANG=C xargs cp -u /home/alex/debian-share/apt-archives/
cp: target 'zlib1g_1%3a1.2.8.dfsg-2+b1_i386.deb' is not a directory
I can not figure out what I am doing wrong. Is this way even possible?
My problem is I can not script. Probable it is somthing like that
for i in *_i386.deb ; do cp [option] full-path to shared-folder
I didn't dry, because I will not mess my Host.
cp -t
instead ofcp -u
?-u, --update copy only when the SOURCE file is newer than the destination file or when the destination file is missing
cp -ut /home/alex/debian-share/apt-archives/ /var/cache/apt/archives/*i386*
.. please try this on some other sample directories