Say i want to extract my ebooks(PDF) from nested folders to a flattened format mkdir ~/mybooks cd ~/nested-books-folder run the command below find . -iname '*.pdf' -exec cp {} '../mybooks/.' \;