← All commands
Topic hub File Management
Windows Linux File Management Expanded guide File System

Windows robocopy equivalent in Linux

Copies and synchronizes directories efficiently, transferring only changed content when possible.

Windows robocopy
→
Linux equivalents
Debian/Ubuntu same command
rsync -avh source/ destination/
Fedora same command
rsync -avh source/ destination/
Arch same command
rsync -avh source/ destination/

Overview

What this command does

On Windows, "robocopy" is used to synchronize directory trees. On Linux, the closest practical mapping shown here is "rsync -avh source/ destination/". Copies and synchronizes directories efficiently, transferring only changed content when possible. This reference is grouped under File Management → File System.

Migration tip: <code>rsync</code> is the closest Linux equivalent to Robocopy. A trailing slash on the source changes whether the directory itself or only its contents are copied.

Windows → Linux context

What changes when you use this on Linux?

Equivalent task, different tool

Windows robocopy maps to rsync -avh source/ destination/ for this task. Treat this as a workflow mapping rather than a character-for-character syntax translation.

Portable across the compared distros

The Debian/Ubuntu, Fedora and Arch rows use the same command in this mapping. Package availability or defaults can still vary, so check the installed tool version when an option behaves differently.

Command-specific caution

--delete permanently removes extra files from the destination. Run once with --dry-run before using it.

Practical tasks

Common use cases

Synchronize directory trees

Copies and synchronizes directories efficiently, transferring only changed content when possible.

rsync -avh source/ destination/

Synchronize folder contents

rsync -avh --progress source/ destination/

Show transfer progress

rsync -avh --delete source/ destination/

Make destination mirror the source

Ready to run

Copyable Linux commands

Review paths, device names, package names and permissions before running any command.

rsync -avh source/ destination/
rsync -avh --progress source/ destination/
rsync -avh --delete source/ destination/

Walkthrough

Examples with explanations

rsync -avh source/ destination/ # copy changed files and preserve metadata
rsync -avh --progress source/ destination/ # show progress during the copy
rsync -avh --delete source/ destination/ # remove destination files missing from source

Reference

Common options and variations

Command or optionUse
rsync -avh source/ destination/Synchronize folder contents
rsync -avh --progress source/ destination/Show transfer progress
rsync -avh --delete source/ destination/Make destination mirror the source

Distro differences

Debian/Ubuntu vs Fedora vs Arch

Debian/Ubuntu, Fedora and Arch all use "rsync -avh source/ destination/" for this mapping. The command syntax shown here is portable across the three rows, although installed versions and system defaults can still vary.

DistributionPackage manager / baseEquivalent commandDifference to notice
Debian/Ubuntu same command rsync -avh source/ destination/ Same command on this distribution.
Fedora same command rsync -avh source/ destination/ Same command on this distribution.
Arch same command rsync -avh source/ destination/ Same command on this distribution.

Important

What to watch out for

--delete permanently removes extra files from the destination. Run once with --dry-run before using it.

Keep learning

Related File Management commands