Regex find and copy in bash (preserving folder structure)? -


I have a folder with a group of log files, each set of log files is in a folder in which the program and time The description was given. Inside these log folders, I have some video files that I want to remove. I want all the video files, nothing else I just tried to use this command to copy video files, but it does not work because a directory was not present.

.rmv I want the file extension of files.

find $ - rgex ". * \ .rmv" -type f -exec cp '{}' / copy / to / here / '{}'

If I have a folder structure like:

  | --root | | --Folder 1 | | | | --file.rmv | | --Folder 2 | | --file2.rmv  

How do I copy it to copy / copy / copy the structure of folder 1 and folder 2 in destination / directory?

I'll just use it.


Comments