Skip to main content
added 34 characters in body
Source Link
Kusalananda
  • 356.1k
  • 42
  • 737
  • 1.1k

For safety, I would delete the .nef files in a separate step after using rsync to transfer both types of files. For example, like this:

rsync --verbose --archive --prune-empty-dirs \ --include='*.nef' \ --include='*.jpg' \ --include='*/' \ --exclude='*' \ "$source/" "$target" find "$source" -type f -name '*.nef' -delete 

The rsync command here would only copy the .nef and .jpg files (it would skip any other file, and it would not create empty directories at $target due to --prune-empty-dirs), and then the find command would delete all .nef files.

I tend to never use --remove-source-files with rsync.

For safety, I would delete the .nef files in a separate step after using rsync to transfer both types of files. For example, like this:

rsync --verbose --archive --prune-empty-dirs \ --include='*.nef' \ --include='*.jpg' \ --include='*/' \ --exclude='*' \ "$source/" "$target" find "$source" -type f -name '*.nef' -delete 

The rsync command here would only copy the .nef and .jpg files (it would not create empty directories at $target due to --prune-empty-dirs), and then the find command would delete all .nef files.

I tend to never use --remove-source-files with rsync.

For safety, I would delete the .nef files in a separate step after using rsync to transfer both types of files. For example, like this:

rsync --verbose --archive --prune-empty-dirs \ --include='*.nef' \ --include='*.jpg' \ --include='*/' \ --exclude='*' \ "$source/" "$target" find "$source" -type f -name '*.nef' -delete 

The rsync command here would only copy the .nef and .jpg files (it would skip any other file, and it would not create empty directories at $target due to --prune-empty-dirs), and then the find command would delete all .nef files.

I tend to never use --remove-source-files with rsync.

added 208 characters in body
Source Link
Kusalananda
  • 356.1k
  • 42
  • 737
  • 1.1k

For safety, I would delete the .nef files in a separate step after using rsync to transfer both types of files, for. For example, like this:

rsync -av-verbose --archive --prune-empty-dirs \ --include='*.nef' \ --include='*.jpg' \ --include='*/' \ --exclude='*' \ "$source/" "$target" find "$source" -type f -name '*.nef' -delete 

The rsync command here would only copy the .nef and .jpg files (it would not create empty directories at $target due to --prune-empty-dirs), and then the find command would delete all .nef files.

I tend to never use --remove-source-files with rsync.

I would delete the .nef files in a separate step after using rsync to transfer both types of files, for example

rsync -av \ --include='*.nef' \ --include='*.jpg' \ --include='*/' \ --exclude='*' \ "$source/" "$target" find "$source" -type f -name '*.nef' -delete 

For safety, I would delete the .nef files in a separate step after using rsync to transfer both types of files. For example, like this:

rsync --verbose --archive --prune-empty-dirs \ --include='*.nef' \ --include='*.jpg' \ --include='*/' \ --exclude='*' \ "$source/" "$target" find "$source" -type f -name '*.nef' -delete 

The rsync command here would only copy the .nef and .jpg files (it would not create empty directories at $target due to --prune-empty-dirs), and then the find command would delete all .nef files.

I tend to never use --remove-source-files with rsync.

Source Link
Kusalananda
  • 356.1k
  • 42
  • 737
  • 1.1k

I would delete the .nef files in a separate step after using rsync to transfer both types of files, for example

rsync -av \ --include='*.nef' \ --include='*.jpg' \ --include='*/' \ --exclude='*' \ "$source/" "$target" find "$source" -type f -name '*.nef' -delete