Help with copy files from multiple directories one inside other of the same type to one directory
Todd Slater
dontodd at gmail.com
Sat Jul 29 11:26:41 UTC 2006
On 7/29/06, José Paulo Matafome Oleiro <matafomeoleiro at gmail.com> wrote:
>
>
> Hello I've need help because I can't copy all the *.deb files that I have in one directory for example like this structure of files:
> main
> |-sources|
> | |->a|
> | |*.deb
> |- multiples|
> |->c|
> |->*.deb (the deep of the directory are much bigger)
>
> Only for example since they're more directorys under the main structure and I need to copy then to ~/filesdeb/*.deb the files need to be all here. I don't wan't to use nautilus to do such job because takes me too long since they're more then 5000 files.
> How I can put this with one command on the shell?
> Thanks in advance for you help
for deb in `find /top/level/directory -type f -iname '*.deb'`
do
cp "$deb" /some/other/directory/
done
HTH,
Todd
More information about the ubuntu-users
mailing list