How do I copy a selected file in Linux?
Answer
Method 1 – Copy specific file types while preserving directory structure using “find” and “cp” or “cpio” commands
Answer
Method 1 – Copy specific file types while preserving directory structure using “find” and “cp” or “cpio” commands
- find – command to find files and folders in Unix-like systems.
- the dot (.) …
- -iname ‘*. …
- -exec cp – execute the ‘cp’ command to copy files from source to destination directory.