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

Windows xcopy equivalent in Linux

Copies directories with more control than cp — supports sync, progress display, resume, and remote copying.

Windows xcopy
→
Linux equivalents
Debian/Ubuntu same command
rsync -av
Fedora same command
rsync -av
Arch same command
rsync -av

Overview

What this command does

On Windows, "xcopy" is used to advanced copy with sync & progress. On Linux, the closest practical mapping shown here is "rsync -av". Copies directories with more control than cp — supports sync, progress display, resume, and remote copying. This reference is grouped under File Management → File System.

Migration tip: <code>rsync</code> only copies <strong>changed files</strong>, making it far faster than xcopy for large backups. It can also copy over SSH to remote machines.

Windows → Linux context

What changes when you use this on Linux?

Equivalent task, different tool

Windows xcopy maps to rsync -av 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

Note the trailing slash: 'rsync -av src/ dest/' copies the *contents* of src. Without the slash, it copies the folder itself inside dest.

Practical tasks

Common use cases

Advanced copy with sync & progress

Copies directories with more control than cp — supports sync, progress display, resume, and remote copying.

rsync -av

Archive mode + verbose output

rsync --progress

Show per-file transfer progress

rsync --delete

Delete files in dest not in source (true sync)

Ready to run

Copyable Linux commands

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

rsync -av Source/ Dest/
rsync -av --progress Source/ Dest/
rsync -av --delete Source/ Dest/
rsync -avz ~/Documents/ user@server:/backup/

Walkthrough

Examples with explanations

# Windows: xcopy /s /e /i Source Dest
rsync -av Source/ Dest/              # copy directory
rsync -av --progress Source/ Dest/   # show progress

# Sync (delete files removed from source):
rsync -av --delete Source/ Dest/    # mirror source to dest

# Backup to a remote server over SSH:
rsync -avz ~/Documents/ user@server:/backup/

Reference

Common options and variations

Command or optionUse
rsync -avArchive mode + verbose output
rsync --progressShow per-file transfer progress
rsync --deleteDelete files in dest not in source (true sync)
rsync -nDry run — preview without copying
rsync -avzCompress data during transfer

Distro differences

Debian/Ubuntu vs Fedora vs Arch

Debian/Ubuntu, Fedora and Arch all use "rsync -av" 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 -av Same command on this distribution.
Fedora same command rsync -av Same command on this distribution.
Arch same command rsync -av Same command on this distribution.

Important

What to watch out for

Note the trailing slash: 'rsync -av src/ dest/' copies the *contents* of src. Without the slash, it copies the folder itself inside dest.

Keep learning

Related File Management commands