In zsh, you can use a recursive glob:
mkdir ~/epubs
mv -- **/*.epub ~/epubs/
 In bash ≥4, run shopt -s globstar (you can put this in your ~/.bashrc) then the command above. In ksh, run set -o globstar first.
 With only POSIX tools, run find:
find . -name '*.epub' -exec mv {} ~/epubs \;
 
                 
                 
                