From ScorecWiki

Jump to: navigation, search

To copy all source files, and their directory structure, from a given directory to a destination directory use the following command:

 rsync -azvv --include "*/" --include "*.cc" --include "*.cpp" --include "*.c" --include "*.f90" --include "*.f" --include "*.F" --include "*.h" --exclude "*" SRC_DIR DEST_DIR

The first include statement includes all subdirectories. The remaining include statements include files with the specified extensions. The exclude statement removes all files not included via the include statements.

Personal tools