XK0-004 · Question #343
A system administrator is setting up a cron job that will copy thousands files from a remote directory on a scheduled basic. The file contents should retain their original permissions, including and…
The correct answer is A. Rsync. Rsync is the best tool for scheduled bulk remote file copies because its delta-transfer algorithm minimizes run time and its archive mode preserves permissions and group ownership.
Question
A system administrator is setting up a cron job that will copy thousands files from a remote directory on a scheduled basic. The file contents should retain their original permissions, including and group ownership, and the cron job should run for the least amount of the possible. Which of the following is the BEST program to use in this situation?
Options
- ARsync
- BCurl
- CScp
- DWget
- Esftp
How the community answered
(39 responses)- A92% (36)
- C5% (2)
- D3% (1)
Why each option
Rsync is the best tool for scheduled bulk remote file copies because its delta-transfer algorithm minimizes run time and its archive mode preserves permissions and group ownership.
Rsync uses a delta-transfer algorithm that compares source and destination and only transfers changed blocks, making repeated scheduled runs significantly faster than full copies when syncing thousands of files. The -a (archive) flag in a single option preserves file permissions, group ownership, timestamps, and symbolic links, satisfying all stated requirements with minimal configuration.
Curl is designed for single-URL data transfers and does not support recursive directory synchronization or preservation of Unix file permissions and group ownership.
SCP copies files securely over SSH but always transfers the full file on every run with no delta checking, making it considerably slower than rsync for repeated scheduled jobs over thousands of files.
Wget is a web content downloader targeting HTTP and FTP URLs and does not support syncing Unix directories while preserving ownership and permission metadata.
SFTP can preserve permissions but operates interactively and lacks delta-transfer capability, so every scheduled run copies all files in full regardless of what has changed.
Concept tested: Rsync delta transfer and archive mode for bulk file sync
Source: https://linux.die.net/man/1/rsync
Topics
Community Discussion
No community discussion yet for this question.