nerdexam
CompTIA

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.

System Management

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)
  • A
    92% (36)
  • C
    5% (2)
  • D
    3% (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.

ARsyncCorrect

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.

BCurl

Curl is designed for single-URL data transfers and does not support recursive directory synchronization or preservation of Unix file permissions and group ownership.

CScp

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.

DWget

Wget is a web content downloader targeting HTTP and FTP URLs and does not support syncing Unix directories while preserving ownership and permission metadata.

Esftp

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

#rsync#cron jobs#file transfer#permissions preservation

Community Discussion

No community discussion yet for this question.

Full XK0-004 Practice