$ date
Wed 24 Apr 2019 09:54:53 AM PDT
$ rsync --version
rsync version 3.1.3 protocol version 31
...
वाक्य - विन्यास: rsync <file_/_folder_list> <source> <target>
फ़ोल्डर के नाम (यहां, अनुगामी के साथ /
; उदाहरण के लिए;Cancer - Evolution/
) एक फ़ोल्डर सूची फ़ाइल में हैं (उदाहरण: cm_folder_list_estestest):
# /mnt/Vancouver/projects/ie/claws/data/cm_folder_list_test
# test file: 2019-04-24
Cancer/
Cancer - Evolution/
Cancer - Genomic Variants/
Cancer - Metastasis (EMT Transition ...)/
Cancer Pathways, Networks/
Catabolism - Autophagy; Phagosomes; Mitophagy/
Catabolism - Lysosomes/
यदि आप उन अनुगामी को शामिल नहीं करते हैं /
, तो rsync'd लक्ष्य फ़ोल्डर बनाए जाते हैं, लेकिन खाली हैं।
उन फ़ोल्डर नामों को उनके शेष पथ से जोड़ दिया जाता है (/home/victoria/Mail/2_RESEARCH - NEWS
), इस प्रकार पूरा फ़ोल्डर पथ rsync को प्रदान करता है; उदाहरण के लिए: /home/victoria/Mail/2_RESEARCH - NEWS/Cancer - Evolution/
।
ध्यान दें कि आपको उपयोग करने की आवश्यकता है --files-from=
..., नहीं --include-from=
...
rsync -aqP --delete --files-from=/mnt/Vancouver/projects/ie/claws/data/cm_folder_list_test "/home/victoria/Mail/2_RESEARCH - NEWS" $IN/
(मेरी BASH स्क्रिप्ट में, मैंने वेरिएबल $IN
को निम्नानुसार परिभाषित किया है।)
BASEDIR="/mnt/Vancouver/projects/ie/claws"
IN=$BASEDIR/data/test/input
rsync विकल्प का उपयोग किया जाता है:
-a : archive: equals -rlptgoD (no -H,-A,-X)
-r : recursive
-l : copy symlinks as symlinks
-p : preserve permissions
-t : preserve modification times
-g : preserve group
-o : preserve owner (super-user only)
-D : same as --devices --specials
-q : quiet (/server/547106/run-totally-silent-rsync)
--delete
This tells rsync to delete extraneous files from the RECEIVING SIDE (ones
that AREN’T ON THE SENDING SIDE), but only for the directories that are
being synchronized. You must have asked rsync to send the whole directory
(e.g. "dir" or "dir/") without using a wildcard for the directory’s contents
(e.g. "dir/*") since the wildcard is expanded by the shell and rsync thus
gets a request to transfer individual files, not the files’ parent directory.
Files that are excluded from the transfer are also excluded from being
deleted unless you use the --delete-excluded option or mark the rules as
only matching on the sending side (see the include/exclude modifiers in the
FILTER RULES section). ...