{
  "id": 16122434,
  "title": "Using Rsync to Transfer Files in Linux",
  "url": "https://urgent.news/2026/10/22/using-rsync-to-transfer-files-in-linux",
  "topic": "tech",
  "section": "Tech",
  "published": "2026-10-22T23:23:25.000Z",
  "source": {
    "name": "Dev.to",
    "slug": "dev-to",
    "url": "https://dev.to/vultr/using-rsync-to-transfer-files-in-linux-1c6f"
  },
  "original_language": "en",
  "account": "Rsync is a powerful file transfer tool used for synchronizing files across systems. It efficiently transfers only the differences between source and destination files, making it a popular choice among system administrators and developers.\n\nTo install Rsync on various Linux distributions, use the following commands:\n- Ubuntu and Debian: `sudo apt install rsync`\n- FreeBSD: `sudo pkg install rsync`\n- Arch Linux: `sudo pacman -S rsync`\n- Fedora, AlmaLinux, Rocky Linux, and VzLinux: `sudo dnf install rsync`\n- CentOS: `sudo yum install rsync`\n\nThe basic syntax for the Rsync command is `rsync [OPTION] SRC DEST`. Here, `[OPTION]` represents the options or flags passed to the Rsync command, `SRC` is the source files and directories, and `DEST` is the destination where the files or directories will be synchronized.\n\nCommon Rsync options include:\n- `--help` or `-h`: Display Rsync command help\n- `--verbose` or `-v`: Increase verbosity\n- `--quiet` or `-q`: Suppress non-error messages\n- `--archive` or `-a`: Archive mode\n- `--recursive` or `-r`: Recurse into directories\n- `--relative` or `-R`: Use relative path names\n- `--update` or `-u`: Skip files that are newer on the receiver\n- `--inplace`: Update destination files in-place\n- `--backup` or `-b`: Make backups\n- `--backup-dir=DIR`: Make backups into a hierarchy based in DIR\n- `--links` or `-l`: Copy symlinks as symlinks\n- `--copy-links` or `-L`: Transform symlink into referent file/dir\n- `--perms` or `-p`: Preserve permissions\n- `--times` or `-t`: Preserve modification times\n- `--delete`: Delete extraneous files from dest dirs\n- `--delete-excluded`: Also delete excluded files from dest dirs\n- `--dry-run` or `-n`: Perform a trial run with no changes made\n- `--rsh=COMMAND` or `-e`: Specify the remote shell to use\n- `--max-size=SIZE`: Don't transfer any file larger than SIZE\n- `--min-size=SIZE`: Don't transfer any file smaller than SIZE\n- `--partial`: Keep incomplete transferred files\n- `--exclude=PATTERN` or `--include=PATTERN`: Exclude or don't exclude files matching the pattern\n- `--progress`: Show progress during transfer\n- `--human-readable` or `-h`: Output numbers in a human-readable format\n- `--compress` or `-z`: Compress file data during transfer\n- `--ipv4` or `-4`: Prefer IPv4\n- `--ipv6` or `-6`: Prefer IPv6\n\nTo transfer local files, use the command `rsync file1 file2 file3 dest`. This command copies the specified files to the destination directory.\n\nTo transfer local directories, use the `-a` flag for archive mode. For example, `rsync -a dest/ dest-copy` copies the contents of the `dest` directory to a new directory called `dest-copy`.\n\nTo exclude specific files or directories from being copied, use the `--exclude` flag. For example, `rsync -a --exclude file2 --exclude dest* .` copies the contents of the current directory, excluding `file2` and all directories starting with `dest`.",
  "summary": "Rsync is a file transfer tool for transferring and synchronizing files across systems. It's commonly used for backups, file mirroring, and updating files between local directories or remote servers. Rsync reduces data transfer by copying only the differences between the source and destination files, and its speed, flexibility, and extensive options make it a popular choice for system…",
  "key_points": [
    "Rsync efficiently transfers only file differences between source and destination.",
    "Install Rsync using distribution-specific commands (e.g., sudo apt install rsync for Ubuntu/Debian).",
    "Use rsync [OPTION] SRC DEST syntax to copy files or directories."
  ],
  "editors_take": null,
  "illustration": null,
  "coverage": {
    "outlets": 1,
    "also_reported_by": []
  },
  "ai_generated": true,
  "disclaimer": "Summaries, key points and the editor’s take are written by software from other outlets’ reporting and may contain errors — always check the linked original."
}