Linux.com

Home Linux Community Community Blogs General Linux Copy files recursive with folder hierarchy (rsync method)

Copy files recursive with folder hierarchy (rsync method)

rsync --include-from=/tmp/include.txt --exclude-from=/tmp/exclude.txt -aRvm ./src /tmp/dest

include.txt
>>*.pdf

exclude.txt
>>*.*

 

-a, --archive               archive mode; equals -rlptgoD (no -H,-A,-X)

-R, --relative              use relative path names

-m, --prune-empty-dirs      prune empty directory chains from file-list

-v, --verbose               increase verbosity

 

Comments

Subscribe to Comments Feed

Upcoming Linux Foundation Courses

  1. LFD320 Linux Kernel Internals and Debugging
    03 Nov » 07 Nov - Virtual
    Details
  2. LFS416 Linux Security
    03 Nov » 06 Nov - Virtual
    Details
  3. LFS426 Linux Performance Tuning
    10 Nov » 13 Nov - Virtual
    Details

View All Upcoming Courses


Who we are ?

The Linux Foundation is a non-profit consortium dedicated to the growth of Linux.

More About the foundation...

Frequent Questions

Join / Linux Training / Board