0

Similarly to Copy specific file type keeping the folder structure I am looking to copy over only specific file types (or files with names containing specific strings) preserving the folder structure. I only want to add the caveat that the folders in question are located on a different server which I connect to through ssh. Normally that means I use scp or rsync on the local system. However, here we want to be able to run find on the remote system. How would I copy the files and directories in this case?

P.S. Would there be a way to estimate the total file size before performing the copy for real.

Kvothe
  • 413
  • 6
  • 14
  • Do you want to copy file types (as stated in your question) or files with specific trailing extensions (as shown in the referenced question)? And what's this about copying files with specific content? – Chris Davies Mar 09 '21 at 20:07
  • @roaima, sorry did not mean files containing content but filenames containing strings. So preferably I would like some method can't just select things with a specific trailing extension but for example also any file containing "some_string" in the filename. This should be an easy modification if find is somehow used but perhaps not for a different solution. – Kvothe Mar 09 '21 at 22:41
  • Thanks for the clarification. Why don't you want to use rsync? It can do everything you've asked – Chris Davies Mar 09 '21 at 23:12

0 Answers0